diff --git a/libs/common/src/models/response/errorResponse.ts b/libs/common/src/models/response/errorResponse.ts index 3a0d22e695d..859803b441f 100644 --- a/libs/common/src/models/response/errorResponse.ts +++ b/libs/common/src/models/response/errorResponse.ts @@ -21,15 +21,13 @@ export class ErrorResponse extends BaseResponse { } } - if (errorModel) { + if (status === 429) { + this.message = "Rate limit exceeded. Try again later."; + } else if (errorModel) { this.message = this.getResponseProperty("Message", errorModel); this.validationErrors = this.getResponseProperty("ValidationErrors", errorModel); this.captchaSiteKey = this.validationErrors?.HCaptcha_SiteKey?.[0]; this.captchaRequired = !Utils.isNullOrWhitespace(this.captchaSiteKey); - } else { - if (status === 429) { - this.message = "Rate limit exceeded. Try again later."; - } } this.statusCode = status; }