Junior REST API

What is a standard approach for sending error responses in REST APIs?

  • Return a structured JSON response with:
  • status → HTTP status code
  • error → Short message
  • details → Optional for debugging

Example:

"status": 400,

"error": "Bad Request",

"details": "Email is required"

More from ASP.NET Core Web API Tutorial

All questions for this course