Skip to content

Commit bbc1328

Browse files
authored
feat: Add error code ranges
1 parent 52d7e1a commit bbc1328

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

_includes/common/errors.md

+23
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,26 @@ The following is a list of all the error codes that can be returned by the Parse
172172
| `ServiceUnavailable` | 2 | The service is currently unavailable. |
173173
| `ClientDisconnected` | 4 | Connection failure. |
174174
{: .docs_table}
175+
176+
## Error Code Ranges
177+
178+
In order to provide better organization and avoid conflicts with Parse Platform's built-in `Parse.Error` codes, the following ranges are defined:
179+
180+
### Parse Server and Related Modules
181+
182+
- Error code range: `<= 4999` (including negative numbers)
183+
- 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.
184+
185+
### Reserved
186+
187+
- Error code range: `>= 5000 and <= 8999`
188+
- This range is currently reserved for future use and should not be used by anyone.
189+
190+
### App Developers (Custom App Errors)
191+
192+
- Error code range: `>= 9000 and <= 9999`
193+
- 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.
194+
195+
### 3rd Party Providers of Parse Platform Components
196+
197+
- 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.

0 commit comments

Comments
 (0)