Looking to hire Laravel developers? Try LaraJobs

laravel-json-api-exceptions maintained by floor9design

Description
A set of classes that allow for creating JSON API compliant objects
Author
Last update
2026/11/29 17:21 (dev-main)
License
Downloads
0

Comments
comments powered by Disqus

Laravel JSON:API Exceptions

Easily render Laravel API exceptions as consistent JSON:API error responses.

Latest Version Packagist Software License

Build Status

Github Downloads Packagist Downloads

Introduction

The JSON API has a precise response format. This set of classes allows these to be easily created and interrogated, meaning easy and reliable output/input processing.

The floor9design-ltd/json-api-formatter package offers a great way to automatically format these, easing the process significantly.

However, in real life development generic or system errors can be an afterthought and sometimes left out. This package offers a well-rounded boilerplate for the Laravel framework, so that these are taken care of in a few minutes.

It gives a shared exception renderer.

Features

  • Simple setup in Laravel
  • Easy use; simply throw an exception inside your Laravel logic and this will be caught and displayed professionally
  • Consistent JSON:API responses.
  • Standard responses for authentication, authorisation, validation and resource lookup failures.
  • Wide range of errors recognised

Requirements

The renderer uses JSON:API Formatter to build error documents.

Documentation

Project status

This README describes the planned first release. The package and linked guides are in development.

Credits

As always - a github watch/star and a follow is appreciated!