Gabriella Lotz has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/23702


Change subject: [rest] Return HTTP 503 for non-leader masters
......................................................................

[rest] Return HTTP 503 for non-leader masters

Non-leader masters now return HTTP 503 (Service Unavailable) instead
of HTTP 500 (Internal Server Error) when handling REST API requests.

This change provides more semantically correct HTTP status codes:
- HTTP 500 suggests an internal malfunction or unexpected error
- HTTP 503 indicates the service exists but is temporarily unavailable
  at this particular server instance

The non-leader master is functioning correctly; it simply cannot
service the request because it's not in the leader role. This is a
temporary condition that can change during leader elections, making
503 the appropriate status code.

Change-Id: I62fa177f93b40daae542000aff64b6b432e38467
---
M src/kudu/master/rest_catalog_path_handlers.cc
M src/kudu/master/spnego_rest_catalog-test.cc
2 files changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/02/23702/1
--
To view, visit http://gerrit.cloudera.org:8080/23702
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I62fa177f93b40daae542000aff64b6b432e38467
Gerrit-Change-Number: 23702
Gerrit-PatchSet: 1
Gerrit-Owner: Gabriella Lotz <[email protected]>

Reply via email to