Skip to main content
Dev · 283 tools

Error Message Generator

Generates realistic HTTP error codes and messages for testing and mocks

Error MessagesExample — click Generate for yours
  • Warning: deprecated module MD5() will be removed in v2.0
  • Build failed: unable to resolve module
  • Database error: connection timeout after 30s
  • Warning: deprecated flag MD5() will be removed in v4.0
  • SyntaxError: Unexpected token '}' at handler.js:12

Generated 5 items

See 3 examples
  • Example 1
    Warning: deprecated module MD5() will be removed in v2.0
    Build failed: unable to resolve module
    Database error: connection timeout after 30s
    Warning: deprecated flag MD5() will be removed in v4.0
    SyntaxError: Unexpected token '}' at handler.js:12
  • Example 2
    Database error: relation "users" does not exist
    Rate limited: 668/s exceeded, retry after 56s
    Build failed: missing dependency
    RangeError: 'x' is not defined at handler.js:24
    Python: Traceback (most recent call last)
      File "app.py", line 191, in handle_request
    ZeroDivisionError: invalid literal for int() with base 10: 'abc'
  • Example 3
    CORS: origin https://client.example not in allowed list
    CI/CD: pipeline failed at stage "test"
    Error: ENETUNREACH — could not reach postgres:5432
    Python: Traceback (most recent call last)
      File "app.py", line 77, in process
    ZeroDivisionError: list index out of range
    Python: Traceback (most recent call last)
      File "app.py", line 255, in save
    AttributeError: 'NoneType' object has no attribute 'name'

About this generator

When building error-handling tests or populating a mock API, you need varied, realistic HTTP errors — not the same 500 repeated ten times. This generator returns a shuffled selection of status-code-plus-message pairs from the ten errors most APIs encounter. One input controls the output: the count field (1–10) sets how many to return. The generator draws from a fixed pool — 400, 401, 403, 404, 409, 422, 429, 500, 502, and 503 — shuffles them, and returns the requested number. Each entry pairs the numeric code with a concise plain-English description. Drop the output into test fixtures to exercise error-handling branches, populate a mock API, or copy descriptions into API documentation. Adjust any user-facing message wording to match your application's tone and add recovery hints where appropriate.

How to use

  1. Choose how many error messages you want.
  2. Click Generate to produce a shuffled set.
  3. Copy the codes and messages into your tests, mocks, or docs.
  4. Adjust the wording to match your application.

Use Cases

  • •Seeding error-handling test cases with varied responses
  • •Populating a mock API with realistic failure messages
  • •Documenting the possible errors an endpoint can return
  • •Building a reference of common HTTP status codes
  • •Explaining error meanings to less technical teammates

Tips

  • →Use a varied set to test that your error handling covers each case.
  • →Avoid leaking internal detail in user-facing error messages.
  • →Add a recovery hint to user-facing errors where you can.
  • →Match the message tone to the rest of your application.

FAQ

which HTTP status codes are included in the pool

Ten codes: 400, 401, 403, 404, 409, 422, and 429 on the client-error side, plus 500, 502, and 503 on the server-error side. The generator shuffles these on each run and returns however many you request, up to ten.

can I request more than ten error messages

No — the pool contains exactly ten distinct errors, so the maximum count is ten. Requesting more is clamped without repeating entries.

are the descriptions production-ready

They are accurate starting points. For user-facing errors, adjust the tone, avoid exposing internal detail, and add a hint about what the user can do next — the generated descriptions explain the failure but do not suggest a recovery action.

does the order of returned errors have meaning

No — the pool is shuffled randomly on each run. If you need a specific set of codes for a test, copy the output and sort or filter it manually.

You might also like

Popular tools from other categories that share themes with this one.