Add user errors for raising within route handlers
Have simple exception classes for route handlers to raise when there is a non-critical, non-server error that should be handled by BaseController. When one of these errors are raised and caught by Sinatra, a uniform JSON error page should be returned to the client.
Might be possible to bundle multiple user errors with an umbrella exception class that can hold many exceptions in it (and return them all to the client).
Basic examples:
raise Errors::AUTH_REQUIRED
raise Errors::BAD_TOKEN
raise Errors::NOT_FOUND, '/v2/asdf'
raise Errors::VALIDATION_ERROR, '$.username', 'must be less than 32 characters'
# Possible umbrella exception?
raise Errors::Umbrella,
Errors::VALIDATION_ERROR.new('$.username', 'must be less than 32 characters'),
Errors::VALIDATION_ERROR.new('$.id', 'cannot be altered')