# Give one group of endpoints the same error format

Four different error formats across one group of endpoints, reduced to the one the project already documents.

Category: API surface and contracts
Source: https://letsship.ai/use-cases/standardize-the-error-envelope
Published: 2026-08-25

## Goal

Make every route in one group return the project's standard error envelope.

## Acceptance criteria

- Every error response uses the same shape
- Status codes follow the project's convention
- A test per route asserts the shape
- Consumers affected by any change are named in the description

## What lands as proof

A per-route assertion on the error shape, which is the only way to catch the handler that returns its own format.

## Prompt

Copy this to an agent to open the ticket:

```text
Create a Linear issue in my team and assign it to the SHIP agent.

Title: Standardise error responses across {group}

Description: Make every route in one group return the project's standard error envelope.

Acceptance criteria:
- Every error response uses the same shape
- Status codes follow the project's convention
- A test per route asserts the shape
- Consumers affected by any change are named in the description

Before you create the issue, compare the error responses across one route group in this repository and replace {group} with it.
```

## Questions

### What does the agent actually change?

The ticket is scoped to one outcome: make every route in one group return the project's standard error envelope. Work that serves that outcome is in scope, and anything outside it is left for a separate ticket, so the pull request stays reviewable.

### How do I know the work is done?

The pull request carries the evidence, not only the diff. Here that means every route returns the same shape, asserted per route, so a reviewer can confirm the result without reproducing the work locally.

### How much oversight does this need?

None is required before the run starts. Every claim this ticket makes can be checked by machine, so the agent works straight through and a person reviews the finished pull request like any other.
