By default .net API returns error in this format RFC 7807. RFC 7807 is a Standard “Problem Details for HTTP APIs”. This is a JSON error format used Asp.net (application/problem+json).

5 standard fields in RFC 7807

  • type – Unique URI of error (to identify error type).
  • title – Short, human-readable summary.
  • status – HTTP status code (e.g. 400).
  • detail – Readable explanation of error.
  • instance – Request’s path or unique ID.
  • errors (optional) – Field-wise validation messages (added by Asp.net).

There’s no standard format for success APIs.

Benefits of RFC 7807

  • Standardized error structure across APIs.
  • Easy for clients/tools to parse automatically.
  • Extendible custom fields like errors.
  • Consistent debugging & documentation.