core icon indicating copy to clipboard operation
core copied to clipboard

Add a way to add an `@id` (hydra) or `type` in errors

Open nesl247 opened this issue 3 years ago • 0 comments

Description
Currently custom errors do not have any identifiable information in them that a frontend application can check. Both Hydra via the @id (https://www.hydra-cg.com/spec/latest/core/#example-32-non-rfc-7807-compliant-error-description-using-raw-hydra-json-ld-representation) and RFC 7807 via type allow for providing an identifier for the type of errors.

This is important as applications need to be able to handle different types of errors in different ways, separately from the HTTP status code. For example, a response may be a 403, but the user may not have access for different reasons. It could be a permission issue, the user isn't enabled, etc.

nesl247 avatar Sep 21 '22 16:09 nesl247