Skip to content

Change default connection failure message #1469

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

Closed
3 tasks done
dblythy opened this issue Apr 1, 2022 · 3 comments · Fixed by #2014
Closed
3 tasks done

Change default connection failure message #1469

dblythy opened this issue Apr 1, 2022 · 3 comments · Fixed by #2014
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@dblythy
Copy link
Member

dblythy commented Apr 1, 2022

New Feature / Enhancement Checklist

Current Limitation

If Parse JS SDK is unable to connect to the server, the error thrown is 'XMLHttpRequest failed: "Unable to connect to the Parse API" which is rather confusing for client users.

Feature / Enhancement Description

It would be good to change the default error message to something more helpful such as Could not connect to the server which non-technical users could understand. Or, allow JS SDK to specify custom error messages via something like Parse.customError.101

Example Use Case

n/a

Alternatives / Workarounds

n/a

3rd Party References

related

@parse-github-assistant
Copy link

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!

@mtrezza
Copy link
Member

mtrezza commented Apr 4, 2022

How about throwing the Parse.Error:

ConnectionFailed | 100 | The connection to the Parse servers failed.

I classified this as a bug, because we do have an explicit Parse.Error defined for this and it is not thrown.

This looks like a breaking change. If the error currently thrown has no error code, only the message, then someone parsing for that string (instead of comparing error codes as it should be) will have to change their client code, right?

@mtrezza mtrezza added type:feature New feature or improvement of existing feature type:bug Impaired feature or lacking behavior that is likely assumed and removed type:feature New feature or improvement of existing feature labels Apr 4, 2022
@dblythy
Copy link
Member Author

dblythy commented Apr 4, 2022

I will have to do some investigating

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
2 participants