Skip to content

update errors.md #941

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

Merged
merged 3 commits into from
Jan 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions _includes/common/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,26 @@ The following is a list of all the error codes that can be returned by the Parse
| `ServiceUnavailable` | 2 | The service is currently unavailable. |
| `ClientDisconnected` | 4 | Connection failure. |
{: .docs_table}

## Error Code Ranges

In order to provide better organization and avoid conflicts with Parse Platform's built-in `Parse.Error` codes, the following ranges are defined:

### Parse Server and Related Modules

- Error code range: `<= 4999` (including negative numbers)
- This range is reserved exclusively for errors generated by Parse Server and its directly related modules. It includes all predefined errors listed in the documentation.

### Reserved

- Error code range: `>= 5000 and <= 8999`
- This range is currently reserved for future use and should not be used by anyone.

### App Developers (Custom App Errors)

- Error code range: `>= 9000 and <= 9999`
- Developers may use this range for defining custom errors specific to their applications. This range is reserved to ensure that custom application errors do not conflict with those defined by Parse Server and its modules.

### 3rd Party Providers of Parse Platform Components

- We discourage from introducing new custom error codes in 3rd party components, as they may conflict with either of the reserved ranges mentioned above. Instead, use the general internal Parse Server error code `1` and add any specific information in the error message, or use another pre-defined error code of Parse Platform.