fix(server/workspace): reduce log level for user-configured oidc problem (#5341)

* fix(server/workspace): reduce log level for user-configured oidc problem

* status code should not be 500 as it is a user error
This commit is contained in:
Iain Sproat
2025-08-29 11:16:48 +01:00
committed by GitHub
parent d0fe667907
commit 22f13b152d
2 changed files with 3 additions and 2 deletions
@@ -32,6 +32,7 @@ export class SsoProviderProfileMissingError extends BaseError {
export class SsoProviderProfileMissingPropertiesError extends BaseError {
static code = 'SSO_PROVIDER_PROFILE_MISSING_PROPERTIES_ERROR'
static statusCode = 400
constructor(properties: string[]) {
super(
[
@@ -736,9 +736,9 @@ const getOidcProviderUserDataFactory =
throw new SsoProviderProfileMissingError()
}
if (!isValidOidcProfile(oidcProviderUserData)) {
req.log.error(
req.log.info(
{ providedClaims: Object.keys(oidcProviderUserData) },
'Missing required properties on OIDC provider.'
'Missing required properties ("email" or "upn") on OIDC provider.'
)
throw new SsoProviderProfileMissingPropertiesError(['email'])
}