Bird
0
0

You receive this Problem Details JSON:

medium📝 Debug Q14 of 15
Rest API - Error Handling
You receive this Problem Details JSON:
{"title": "Invalid input", "status": 400, "detail": "Missing required field 'name'"}

What is missing that violates RFC 7807 requirements?
AThe 'title' field should be a URL
BThe 'status' field should be a string
CThe 'detail' field should be omitted
DThe 'type' field is missing
Step-by-Step Solution
Solution:
  1. Step 1: Check required fields in the JSON

    The 'type' field is required by RFC 7807 but is missing here.
  2. Step 2: Validate other fields

    'status' is correctly a number, 'detail' and 'title' are valid types.
  3. Final Answer:

    The 'type' field is missing -> Option D
  4. Quick Check:

    Missing required field = type [OK]
Quick Trick: Always include 'type' field in Problem Details [OK]
Common Mistakes:
  • Thinking 'status' must be string
  • Removing 'detail' field
  • Assuming 'title' must be URL

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes