mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
fix(webapp): handle the too many requests error
This commit is contained in:
@@ -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(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user