-
-
Notifications
You must be signed in to change notification settings - Fork 924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
completeErrorResponse function should stringify response before assigning it to Error in request #2802
Comments
On further logging, it seems that there is an exception that is not being handled properly at Line 97 in 645cf66
This is the error:
and the value of the response parameter is: |
I just tested with my changes by pointing my package json to the local, and I am wondering if this is the correct way to handle this issue, as I am now getting a string
|
You're...kidding... Is there seriously no way to get the original text as a string from an XHR independent of |
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseText I can update the PR to check for the string value of these types? https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType |
Mithril.js version:
2.2.2
Browser and OS:
Chrome, Safari
The BAAS that I am using is sending an error object response that is not in the way completeErrorResponse is expecting.
It seems like completeErrorResponse is expecting the response to be a string but in my case the response is an object. Since new Error expects a string, wh3en completeErrorResponse assigns the error response to new error, it is no longer accessable, as when attempting to parse it, I get
[object Object]
The text was updated successfully, but these errors were encountered: