mirror of
https://github.com/outline/outline.git
synced 2026-01-05 10:40:07 -06:00
Improved error handling for Azure auth, add default value for AZURE_RESOURCE_ID
This commit is contained in:
@@ -69,9 +69,9 @@ if (env.AZURE_CLIENT_ID && env.AZURE_CLIENT_SECRET) {
|
||||
);
|
||||
}
|
||||
|
||||
if (!organizationResponse) {
|
||||
if (!organizationResponse?.value?.length) {
|
||||
throw MicrosoftGraphError(
|
||||
"Unable to load organization info from Microsoft Graph API"
|
||||
`Unable to load organization info from Microsoft Graph API: ${organizationResponse.error?.message}`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@ class AzurePluginEnvironment extends Environment {
|
||||
|
||||
@IsOptional()
|
||||
@CannotUseWithout("AZURE_CLIENT_ID")
|
||||
public AZURE_RESOURCE_APP_ID = this.toOptionalString(
|
||||
environment.AZURE_RESOURCE_APP_ID
|
||||
);
|
||||
public AZURE_RESOURCE_APP_ID =
|
||||
this.toOptionalString(environment.AZURE_RESOURCE_APP_ID) ??
|
||||
"00000003-0000-0000-c000-000000000000";
|
||||
|
||||
@IsOptional()
|
||||
@CannotUseWithout("AZURE_CLIENT_ID")
|
||||
|
||||
Reference in New Issue
Block a user