From 79dbb60e9a34e4195b9b96e066c8285cb10a7c6b Mon Sep 17 00:00:00 2001 From: henrylee2cn Date: Mon, 12 Mar 2018 19:25:18 +0800 Subject: [PATCH] Rerror: Add 502 code --- common.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common.go b/common.go index 72146532..d51c9402 100644 --- a/common.go +++ b/common.go @@ -61,12 +61,12 @@ const ( CodeNotFound = 404 CodePtypeNotAllowed = 405 CodeHandleTimeout = 408 + CodeBadGateway = 502 // CodeConflict = 409 // CodeUnsupportedTx = 410 // CodeUnsupportedCodecType = 415 // CodeInternalServerError = 500 - // CodeBadGateway = 502 // CodeServiceUnavailable = 503 // CodeGatewayTimeout = 504 // CodeVariantAlsoNegotiates = 506 @@ -96,6 +96,8 @@ func CodeText(rerrCode int32) string { return "Handle Timeout" case CodePtypeNotAllowed: return "Packet Type Not Allowed" + case CodeBadGateway: + return "Bad Gateway" case CodeUnknownError: fallthrough default: