修复报错信息
This commit is contained in:
parent
463c208640
commit
db036098bc
@ -57,7 +57,7 @@ var catalog = map[Code]Spec{
|
||||
DisplayUserIDLeaseExpired: spec(codes.FailedPrecondition, httpStatusConflict, DisplayUserIDLeaseExpired, "conflict"),
|
||||
DisplayUserIDPaymentRequired: spec(codes.FailedPrecondition, httpStatusConflict, DisplayUserIDPaymentRequired, "conflict"),
|
||||
|
||||
CountryChangeCooldown: spec(codes.FailedPrecondition, httpStatusConflict, CountryChangeCooldown, "conflict"),
|
||||
CountryChangeCooldown: spec(codes.FailedPrecondition, httpStatusConflict, CountryChangeCooldown, "country change is cooling down"),
|
||||
CountryNotFound: spec(codes.NotFound, httpStatusNotFound, CountryNotFound, "not found"),
|
||||
RegionNotFound: spec(codes.NotFound, httpStatusNotFound, RegionNotFound, "not found"),
|
||||
RegionCountryConflict: spec(codes.FailedPrecondition, httpStatusConflict, RegionCountryConflict, "conflict"),
|
||||
|
||||
@ -78,6 +78,14 @@ func TestCatalogMappings(t *testing.T) {
|
||||
publicCode: string(LedgerConflict),
|
||||
publicMessage: "conflict",
|
||||
},
|
||||
{
|
||||
name: "country cooldown keeps actionable app message",
|
||||
code: CountryChangeCooldown,
|
||||
grpcCode: codes.FailedPrecondition,
|
||||
httpStatus: httpStatusConflict,
|
||||
publicCode: string(CountryChangeCooldown),
|
||||
publicMessage: "country change is cooling down",
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
||||
@ -4028,7 +4028,7 @@ func TestChangeCountryUsesAuthenticatedUserIDAndMapsCooldown(t *testing.T) {
|
||||
|
||||
router.ServeHTTP(recorder, request)
|
||||
|
||||
assertEnvelope(t, recorder, http.StatusConflict, string(xerr.CountryChangeCooldown), "req-country-cooldown")
|
||||
assertEnvelopeMessage(t, recorder, http.StatusConflict, string(xerr.CountryChangeCooldown), "country change is cooling down", "req-country-cooldown")
|
||||
}
|
||||
|
||||
func TestChangeCountryRemovesOldRegionBroadcastMember(t *testing.T) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user