Skip to content

Define built-in error code range #943

Closed
@mtrezza

Description

@mtrezza

Is your feature request related to a problem? Please describe.
It can be useful to throw a custom Parse.Error in cloud code and handle that specific error on the client side by error code.

For example an error, when a user account is banned.

throw new Parse.Error(9001, "account banned");

If a new built-in Parse Error is introduced in the future, it can conflict with the custom error code. There is currently no way to prevent such a future conflict as the range for built-in error codes is not defined in the docs.

Describe the solution you'd like
Define the built-in error code range in the docs ...-999, so custom error codes won't conflict.
Currently, built-in Parse Error codes have up to 3 digits.

Alternatives
Reserve an error code range for custom errors, e.g. 9001-9999.

Additional context
Not sure in which range adapters (push adapter, etc) are currently throwing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions