You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the past I had code in a long-standing app that I believe tested against RequestEntityTooLargeError OK, since I was testing some upload file sizes when the code was written, but I noticed today that is now failing in some logs. Took a brief look at restify.errors and found that RequestEntityTooLargeError doesn't appear to be present. Instead, I found the following:
PreconditionFailedError
PayloadTooLargeError (different)
UriTooLongError (different)
UnsupportedMediaTypeError
Might be a good idea to possibly support the old codes too to match the documentation, or if not, at least to update the documentation to match the code base?
The text was updated successfully, but these errors were encountered:
Hello, thank you for the report. Is there any chance you recently updated to Node4+? The error codes are automatically generated from the core http module's status codes, and there was a breaking change between 0.x and 4. You can test it yourself by switching between node versions and running this snippet:
var http = require('http');
console.log(http.STATUS_CODES);
I agree that the documentation can be updated to note this breaking change; I suspect many may be unaware.
The built-in list of HttpErrors at http://restify.com/#error-handling includes:
In the past I had code in a long-standing app that I believe tested against RequestEntityTooLargeError OK, since I was testing some upload file sizes when the code was written, but I noticed today that is now failing in some logs. Took a brief look at
restify.errors
and found that RequestEntityTooLargeError doesn't appear to be present. Instead, I found the following:Might be a good idea to possibly support the old codes too to match the documentation, or if not, at least to update the documentation to match the code base?
The text was updated successfully, but these errors were encountered: