Skip to content
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

Parse.Error Inconsistencies #1269

Open
4 tasks done
mtrezza opened this issue Dec 5, 2020 · 2 comments
Open
4 tasks done

Parse.Error Inconsistencies #1269

mtrezza opened this issue Dec 5, 2020 · 2 comments
Labels
type:feature New feature or improvement of existing feature

Comments

@mtrezza
Copy link
Member

mtrezza commented Dec 5, 2020

New Issue Checklist

Issue Description

There are inconsistencies between the Parse.Errors

  • as defined in the Parse JS SDK
    • some errors are defined in the JS SDK but not described in the docs
  • as described in the docs
    • some errors are described in the docs but not defined in the JS SDK (e.g. they were relevant for hosted Parse.com)
  • as used in Parse Server
    • some errors are not defined in the JS SDK but composed in code
    • some errors show a different error code in the docs than as they are defined in the JS SDK
    • some errors thrown are TypeError or just JS Error instead of ParseError

Problems:

  • confusion on developer side
  • difficult to look for a free error code; one has to look into several repos to ensure an error code is unused

Suggested Solution

The error codes should be consolidated and referenced from one single source. Ideally, the error codes should be moved into their own repo so that they can be referenced from every other repo.

@mtrezza mtrezza changed the title Parse.Errors Inconsistencies Parse.Error Inconsistencies Dec 5, 2020
@cbaker6
Copy link

cbaker6 commented Dec 30, 2020

I know there have been a few discussions about Parse Errors. In terms of consistency for the SDKs, I think it could be beneficial to add a dedicated Parse Error for all SDKs in the main Errors file, for example, this can be general, code: clientError = 993, where the message is populated by the client itself. sdkError could be used, but "client" seems to match the current error naming conventions.

I say this because for ParseSwift there are a number of errors that get detected before ever hitting the server, I have been using the code for unknownError for these cases, but report what the actual error is in the message. These are still "Parse" errors, but not from the server. I don't think we need to create a dedicated error list for the SDKs themselves as they all operated differently, but providing an error like the one above can help separate SDK and server issues.

@mtrezza
Copy link
Member Author

mtrezza commented Feb 1, 2021

Related: parse-community/docs#943

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

2 participants