QA
Beginner LevelREST APIs & Web Services

What is RFC 7807 Problem Details for HTTP APIs?

❓ Interview Prompt: Explain RFC 7807 standard JSON error payload structure (`type`, `title`, `status`, `detail`, `instance`) and `application/problem+json` media type.

RFC 7807 (updated by RFC 9457) defines a standardized format for carrying machine-readable error details in HTTP response payloads, eliminating inconsistent custom error formats across APIs:

Standard Media Type:

'Content-Type: application/problem+json'

Standard Fields:

•
'type': URI reference identifying the error type.
•
'title': Short human-readable summary.
•
'status': HTTP status code.
•
'detail': Explanation specific to this occurrence.
•
'instance': URI identifying the specific request instance.

Code Implementation Example

json
{
  "type": "https://api.example.com/errors/insufficient-funds",
  "title": "Insufficient Funds",
  "status": 400,
  "detail": "Your account balance ($20.00) is lower than the transaction amount ($50.00).",
  "instance": "/api/v1/accounts/123/transactions/trans_99"
}
💡Standard RFC 7807 problem+json error response payload.
🎯 Interview Key Takeaway

Adopt RFC 7807 application/problem+json format for consistent machine-readable error responses.

#RFC 7807#Error Handling#JSON#Beginner
Back to all REST APIs & Web Services Questions→

More REST APIs & Web Services Interview Questions

Beginner LevelREST APIs & Web Services

What is HTTP Method Idempotency and how do you implement Idempotency Keys for REST APIs?

Beginner LevelREST APIs & Web Services

What are standard HTTP Status Codes (200, 201, 204, 400, 401, 403, 404, 409, 429, 500, 503)?

Beginner LevelREST APIs & Web Services

What are HTTP Verbs (GET, POST, PUT, PATCH, DELETE) and when to use PUT vs PATCH?