Skip to content

Commit 071de94

Browse files
committed
Throw error when external user id is null when validating this
1 parent fc94f82 commit 071de94

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

authorizer-app-backend/src/main/java/org/radarbase/authorizer/service/RestSourceUserService.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ class RestSourceUserService(
121121
"External user ID ${token.externalUserId} is already registered for another user of source type ${user.sourceType} and user id ${existingUser.userId}",
122122
)
123123
}
124+
} else {
125+
throw HttpBadRequestException(
126+
"missing_external_user_id",
127+
"External user ID cannot be empty",
128+
)
124129
}
125130
}
126131

0 commit comments

Comments
 (0)