Skip to main content
1 of 2
Evert
  • 101k
  • 18
  • 136
  • 221

A recommendation by the IETF (internet standards body) is using the application/problem+json mediatype.

Notable is that they don't use random numbers, they use strings (specifically uris) to identify errors.

This is a subjective question, but even if you don't use their format, I'd argue that username-not-provided is better in almost every way to 100001.

Evert
  • 101k
  • 18
  • 136
  • 221