mirror of
https://github.com/outline/outline.git
synced 2026-12-03 01:59:03 +03:00
Add debug logging
This commit is contained in:
1 parent
9b807f7a9e
commit
be62497f2a
1 file changed
+13
@@ -8,6 +8,7 @@ import { slugifyDomain } from "@shared/utils/domains";
|
||||
import { parseEmail } from "@shared/utils/email";
|
||||
import accountProvisioner from "@server/commands/accountProvisioner";
|
||||
import { MicrosoftGraphError } from "@server/errors";
|
||||
import Logger from "@server/logging/Logger";
|
||||
import passportMiddleware from "@server/middlewares/passport";
|
||||
import { User } from "@server/models";
|
||||
import { AuthenticationResult } from "@server/types";
|
||||
@@ -75,6 +76,18 @@ if (env.AZURE_CLIENT_ID && env.AZURE_CLIENT_SECRET) {
|
||||
);
|
||||
}
|
||||
|
||||
if (!organizationResponse.value) {
|
||||
Logger.info(
|
||||
"authentication",
|
||||
"API response missing value key",
|
||||
organizationResponse
|
||||
);
|
||||
|
||||
throw MicrosoftGraphError(
|
||||
"Unable to load organization value from Microsoft Graph API"
|
||||
);
|
||||
}
|
||||
|
||||
const organization = organizationResponse.value[0];
|
||||
|
||||
// Note: userPrincipalName is last here for backwards compatibility with
|
||||
|
||||
Reference in new issue
Block a user