mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
show correct error message when the VPP token is invalid (#21744)
relates to #21725 shows the correct UI error when a user tries to upload an invalid token - [x] Added/updated tests
This commit is contained in:
parent
004ed9fc9a
commit
6de73537a1
1 changed files with 2 additions and 2 deletions
|
|
@ -20,7 +20,7 @@ export const getErrorMessage = (err: unknown) => {
|
|||
reasonIncludes: "Duplicate entry",
|
||||
});
|
||||
const invalidTokenReason = getErrorReason(err, {
|
||||
reasonIncludes: "invalid",
|
||||
reasonIncludes: "Invalid token",
|
||||
});
|
||||
|
||||
if (duplicateEntryReason) {
|
||||
|
|
@ -28,7 +28,7 @@ export const getErrorMessage = (err: unknown) => {
|
|||
}
|
||||
|
||||
if (invalidTokenReason) {
|
||||
return "Invalid token. Please provide a valid token from Apple Business Manager.";
|
||||
return invalidTokenReason;
|
||||
}
|
||||
|
||||
return DEFAULT_ERROR_MESSAGE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue