From superpowers-laravel
Configures Laravel exception handling with reportable/renderable exceptions, structured logs including context, and channel strategies for observability and graceful API failures.
npx claudepluginhub jpcaparas/superpowers-laravel --plugin superpowers-laravelThis skill uses the workspace's default tool permissions.
Treat errors as first-class signals; provide context and paths to remediation.
Provides error handling patterns like custom errors, structured logging, retries, circuit breakers for JavaScript/TypeScript apps including Express global handlers.
Implements standardized API error handling with RFC 7807 responses, typed error classes, middleware, and monitoring. Use for consistent HTTP errors across endpoints.
Implements API error handling with standardized responses, logging, monitoring, retry logic, circuit breakers, and validation patterns for Node.js and Python APIs.
Share bugs, ideas, or general feedback.
Treat errors as first-class signals; provide context and paths to remediation.
// app/Exceptions/Handler.php
public function register(): void
{
$this->reportable(function (DomainException $e) {
Log::warning('domain exception', ['code' => $e->getCode()]);
});
$this->renderable(function (ModelNotFoundException $e, $request) {
if ($request->expectsJson()) {
return response()->json(['message' => 'Not Found'], 404);
}
});
}
renderable()