diff options
author | alexnick <alexnick@yandex-team.ru> | 2022-04-08 19:31:24 +0300 |
---|---|---|
committer | alexnick <alexnick@yandex-team.ru> | 2022-04-08 19:31:24 +0300 |
commit | 06dc42cb58de2da375ae23a23247a89553ba95e0 (patch) | |
tree | 1a427c379e059ef539768626e751c450ae26695f | |
parent | f4c6a7ce405604b0245479f195ed29ba1af60c77 (diff) | |
download | ydb-06dc42cb58de2da375ae23a23247a89553ba95e0.tar.gz |
correct error codes
Note: mandatory check (NEED_CHECK) was skipped
ref:91c90c27f2e53645f834674b3b5c5a93c97e4796
-rw-r--r-- | ydb/core/http_proxy/http_req.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/ydb/core/http_proxy/http_req.cpp b/ydb/core/http_proxy/http_req.cpp index b5642c3d634..4a51cb501ca 100644 --- a/ydb/core/http_proxy/http_req.cpp +++ b/ydb/core/http_proxy/http_req.cpp @@ -46,37 +46,36 @@ namespace NKikimr::NHttpProxy { TString StatusToErrorType(NYdb::EStatus status) { switch(status) { case NYdb::EStatus::BAD_REQUEST: - return "InvalidParameterValue"; //TODO: bring here issues and parse from them + return "InvalidParameterValueException"; //TODO: bring here issues and parse from them case NYdb::EStatus::UNAUTHORIZED: - return "AccessDenied"; + return "AccessDeniedException"; case NYdb::EStatus::INTERNAL_ERROR: - return "InternalError"; + return "InternalFailureException"; case NYdb::EStatus::ABORTED: - return "RequestExpired"; //TODO: find better code + return "RequestExpiredException"; //TODO: find better code case NYdb::EStatus::UNAVAILABLE: - return "ServiceUnavailable"; + return "ServiceUnavailableException"; case NYdb::EStatus::OVERLOADED: return "ThrottlingException"; case NYdb::EStatus::SCHEME_ERROR: - return "ResourceNotFound"; + return "ResourceNotFoundException"; case NYdb::EStatus::GENERIC_ERROR: - return "InternalFailure"; //TODO: find better code + return "InternalFailureException"; //TODO: find better code case NYdb::EStatus::TIMEOUT: - return "RequestTimeout"; + return "RequestTimeoutException"; case NYdb::EStatus::BAD_SESSION: - return "AccessDenied"; + return "AccessDeniedException"; case NYdb::EStatus::PRECONDITION_FAILED: - return "ValidationError"; //TODO: find better code case NYdb::EStatus::ALREADY_EXISTS: - return "ValidationError"; //TODO: find better code + return "ValidationErrorException"; //TODO: find better code case NYdb::EStatus::NOT_FOUND: - return "ResourceNotFound"; + return "ResourceNotFoundException"; case NYdb::EStatus::SESSION_EXPIRED: - return "AccessDenied"; + return "AccessDeniedException"; case NYdb::EStatus::UNSUPPORTED: - return "InvalidAction"; + return "InvalidActionException"; default: - return "InternalError"; + return "InternalFailureException"; } } |