Returning exception to callback method receiving invalid json#127
Returning exception to callback method receiving invalid json#127manupsunny wants to merge 2 commits intojsoma:masterfrom manupsunny:master
Conversation
|
manupsunny Please check out this one too which I did without first seeing your change: My version returns a status code such as 400 and 404 as soon as the xhr request fails. I think our versions can be easily combined, since it may still be possible for the xhr request to succeed while the user still experiencing the same error later on. I will look into this later. Also I think it would be nice to have standard messages for each HTTP status code based on what's usually the problem -- for example, an unpublished spreadsheet should result in a 403 error, while 404 is obviously an invalid URL, and 400 is some kind of less specific problem with the xhr request sent to the server (like header corruption I believe. |
|
And further in regard to HTTP error codes, I think I would actually prefer to customize these myself, but perhaps we could return a detailed error object, like this: Then the user would just deal with the first err parameter just like we both had in mind: |
As there are no/limited error handling mechanisms available for the end user now, returning exception to the callback method on getting an invalid json back from Google service.