Skip to content

Use proper validation and error handling instead of exceptions #283

@cdeszaq

Description

@cdeszaq

Exceptions should only be used for exceptional cases, and errors in an API request are not exceptional, they are expected. Right now, we use Exceptions everywhere, but exceptions are very heavy and slow. Instead, we should use proper validation and error checking, and not rely on exceptions bubbling up the stack.

This issue isn't about surfacing those errors to the user in a nice, descriptive way (that may come later), but this is about not using exceptions for data validation any more than we have to.

One impact of this change is that it will remove the massive try-catch blocks in our Resources (endpoints).

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