Unable to get the Response Error
eladcandroid opened this issue · 9 comments
You just reject with the request.responseText, here:
https://github.com/appwrite/sdk-for-js/blob/3f71ea130d6c91ea484f9de821a9ec74345d4160/src/sdk.js#L214
What about the cases when we want to get the error message? For example:
{"message":"Too many requests","code":429,"version":"0.6.2"}
Maybe you should add a case and send request.response when it exists..
Thanks for the feedback Elad! This definitely make sense.
This is a breaking change so will try to schedule it with version 0.7 of the Appwrite server which should introduce some breaking changes to the SDKs anyway.
I was search the docs for this exact issue. 👍
Awesome... Is there a way to avoid or turnoff the first 401 logging?
Only by hiding network errors from your own console. More info on this can be found here: https://stackoverflow.com/questions/41515732/hide-401-console-error-in-chrome-dev-tools-getting-401-on-fetch-call
Fix has been committed: appwrite/sdk-generator@1f35db8
Can I work on thiis issue?
Hey @naman360 this issue has already been fixed. We'll release a new version with the release of Appwrite 0.7
Fixed on Appwrite Web SDK 2.0