Merge pull request #195 from bigcapitalhq/api-rate-env-vars

fix: expose the rate limit to the env variables
This commit is contained in:
Ahmed Bouhuolia
2023-07-23 20:17:51 +02:00
committed by GitHub
7 changed files with 36 additions and 7 deletions

View File

@@ -9,6 +9,7 @@ import { compose } from '@/utils';
let toastKeySessionExpired;
let toastKeySomethingWrong;
let toastTooManyRequests;
function GlobalErrors({
// #withGlobalErrors
@@ -41,6 +42,18 @@ function GlobalErrors({
toastKeySomethingWrong,
);
}
if (globalErrors.too_many_requests) {
toastTooManyRequests = AppToaster.show(
{
message: intl.get('global_error.too_many_requests'),
intent: Intent.DANGER,
onDismiss: () => {
globalErrorsSet({ too_many_requests: false });
},
},
toastTooManyRequests,
);
}
if (globalErrors.access_denied) {
toastKeySomethingWrong = AppToaster.show(
{