Skip to content

Commit

Permalink
Merge branch 'main' into feat-pd-app
Browse files Browse the repository at this point in the history
Signed-off-by: Tal <[email protected]>
  • Loading branch information
talboren authored Nov 12, 2024
2 parents 8010791 + 21d4aab commit 6c0a4be
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion keep-ui/app/providers/provider-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,18 @@ const ProviderForm = ({
})
.catch((error) => {
const updatedFormErrors = error.toString();
setFormErrors(updatedFormErrors);

if (updatedFormErrors.includes("SyntaxError")) {
setFormErrors(
"Bad response from API: Check the backend logs for more details"
);
} else if (updatedFormErrors.includes("Failed to fetch")) {
setFormErrors(
"Failed to connect to API: Check your internet connection"
);
} else {
setFormErrors(updatedFormErrors);
}
onFormChange(formValues, updatedFormErrors);
setIsLoading(false);
onConnectChange(false, false);
Expand Down
2 changes: 1 addition & 1 deletion keep-ui/pages/api/auth/[...nextauth].ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ const azureADAuthOptions = {
authorization: {
params: {
scope:
"api://d6cc6406-9de5-4a9f-bcf1-79e35e14cd2f/default openid profile email",
"api://" + process.env.KEEP_AZUREAD_CLIENT_ID! + "/default openid profile email",
},
},
checks: ["pkce"],
Expand Down

0 comments on commit 6c0a4be

Please sign in to comment.