Skip to content

feat: ✨ general-purpose exception class#37

Merged
Erlend Ellefsen (erlendellefsen) merged 1 commit into
mainfrom
generic-exception
Jan 19, 2026
Merged

feat: ✨ general-purpose exception class#37
Erlend Ellefsen (erlendellefsen) merged 1 commit into
mainfrom
generic-exception

Conversation

@erlendellefsen

Copy link
Copy Markdown
Collaborator
  • Added JsonApiHttpException - a general-purpose exception class that accepts any HTTP status code
throw new JsonApiHttpException(406, "The requested media type is not supported");
{
  "errors": [
    {
      "status": "406",
      "title": "Not Acceptable",
      "detail": "The requested media type is not supported"
    }
  ]
}

@erlendellefsen

Copy link
Copy Markdown
Collaborator Author

Looks good Rolf Håvard Blindheim (@rhblind) ?

@erlendellefsen Erlend Ellefsen (erlendellefsen) merged commit 0cdf9a5 into main Jan 19, 2026
5 checks passed
@erlendellefsen Erlend Ellefsen (erlendellefsen) deleted the generic-exception branch January 19, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant