Guest MemberLanguage   English
.NET & C# · Web API

How would you answer an interview scenario involving HTTP status codes and ProblemDetails in Web API?

AdvancedUpdated 2026-08-09

I would map the business outcome to HTTP semantics and return a consistent ProblemDetails body for errors. If an update fails because the resource changed since the client read it, I would normally return 409 Conflict, or 412 Precondition Failed when the API uses conditional requests such as If-Match with an ETag. I would avoid exposing stack traces and include a correlation identifier for troubleshooting.

#web-api#http#problemdetails