From superpowers-laravel
Configures Laravel exception handling with reportable/renderable exceptions, structured logs including context, and channel strategies for observability and graceful API failures.
How this skill is triggered — by the user, by Claude, or both
Slash command
/superpowers-laravel:exception-handling-and-loggingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Treat errors as first-class signals; provide context and paths to remediation.
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()npx claudepluginhub jpcaparas/superpowers-laravel --plugin superpowers-laravelImplements error handling patterns: custom error hierarchies, structured logging, retry strategies, circuit breakers, and graceful degradation. Includes Express global error handler and anti-patterns checklist.
Implements standardized API error handling with RFC 7807 responses, typed error classes, middleware, and monitoring. Use for consistent HTTP errors across endpoints.
Standardizes error handling across frontend and backend layers with exception hierarchy, error categories, response formats, and boundary patterns.