Status is undefined in case of 413 error
See original GitHub issueRequest.prototype.callback = function(err, res){
if (this._shouldRetry(err, res)) {
return this._retry();
}
var fn = this._callback;
this.clearTimeout();
if (err) {
if (this._maxRetries) err.retries = this._retries - 1;
this.emit('error', err); <==== break point is here
}
fn(err, res);
};
err: Error: Request has been terminated Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc. at Request.crossDomainError (webpack:///../node_modules/superagent/lib/client.js?:621:13) at XMLHttpRequest.xhr.onreadystatechange (webpack:///../node_modules/superagent/lib/client.js?:703:19)
crossDomain
:
true
method
:
"POST"
status
:
undefined
so on error callback I can’t detect status…
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Status is undefined in case of 413 error · Issue #1397 - GitHub
The response contains data that the browser wants to keep secret. This cannot be fixed in superagent. The browser refuses to expose information ......
Read more >How to Solve the "413 Request Entity Too Large" Error - Kinsta
Are you experiencing the "413 Request Entity Too Large" error? In this article, learn how to resolve this error!
Read more >{"error":{"code":413,"message":"request entity too large"}}
This error will occur when the request body's size is larger than the "limit" option. The limit property will be set to the...
Read more >What Is a 413 Request Entity Too Large Error & How to Fix It
A 413 HTTP error code occurs when the size of a client's request exceeds the server's file size limit. This typically happens when...
Read more >413 Request Entity Too Large - TooBigBody | Apigee Edge
This error occurs if the payload size sent by the client application to Apigee Edge as part of HTTP request is greater than...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you see
status == 0
that’s a CORS (security) violation from browser’s perspective. The response contains data that the browser wants to keep secret. This cannot be fixed in superagent. The browser refuses to expose information about this error.PR welcome