ui: display invalid credentials error for integrations
This commit is contained in:
parent
11d4b168a1
commit
08329ed3a0
1 changed files with 5 additions and 1 deletions
|
|
@ -81,7 +81,11 @@ export async function saveIntegration<T>(
|
|||
return r.ok;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
toast.error(`Failed to save ${name} integration`);
|
||||
if (e.response.status === 422) {
|
||||
toast.error(`Invalid credentials for ${name}`);
|
||||
} else {
|
||||
toast.error(`Failed to save ${name} integration`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue