br-error-contract

Installation
SKILL.md

better-route: error contract

Throw ApiException for deliberate caller-visible failures. Let unexpected throwables be scrubbed.

use BetterRoute\Http\ApiException;

throw new ApiException(
    message: 'Order is temporarily locked.',
    status: 409,
    errorCode: 'order_locked',
    details: ['orderId' => $id],
    headers: ['Retry-After' => '5'],
);

The default envelope is:

Installs
1
GitHub Stars
22
First Seen
1 day ago
br-error-contract — lonsdale201/wp-agent-skills