🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: API Design: all 15 questions

Quiz: API Design · Question 9 of 15

A server returns 200 OK with the body {"error": "payment failed"}. What is the main problem?

A server returns 200 OK with the body {"error": "payment failed"}. What is the main problem?

  1. A.The body is too small
  2. B.Clients and monitoring see a success code and cannot tell the request failed
  3. C.200 is only allowed for GET
  4. D.JSON cannot contain the word error
Answer & explanation

Correct answer: Clients and monitoring see a success code and cannot tell the request failed

Status codes are how tools count failures; a failed request needs a 4xx or 5xx code.

Can you get the rest right without peeking?

Take the timed Quiz: API Design quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →