Standardize API error handling

Consistent error responses without leaking environment details.

Jump to the prompt
THE RESULT

Consistent error responses without leaking environment details.

READY-TO-USE PROMPT
Review error handling for [ENDPOINT] in [REPO]. Follow the project's response conventions while preserving appropriate HTTP codes and useful messages. Remove accidental internal details from responses. Verify valid input, invalid input and denied access in the test environment.

Paste into a conversation with LocalCommander. Replace bracketed fields with your own paths, files or URLs.

THE WORKFLOW

From your material to a result.

  1. 01

    Prepare the inputs: Repository and selected endpoint.

  2. 02

    Replace square-bracket placeholders with the actual names, paths or URL. Paste the prompt into a chat with LocalCommander connected.

  3. 03

    Verify the result: Consistent error responses without leaking environment details. Ask for the saved file location or the evidence behind the findings.