Skip to content

CDA-105: Updated authentication error message for expired API keys#1667

Open
zack-rma wants to merge 4 commits intoUSACE:developfrom
zack-rma:feature/exp_key_error_msgs
Open

CDA-105: Updated authentication error message for expired API keys#1667
zack-rma wants to merge 4 commits intoUSACE:developfrom
zack-rma:feature/exp_key_error_msgs

Conversation

@zack-rma
Copy link
Copy Markdown
Collaborator

@zack-rma zack-rma commented Apr 1, 2026

Resolves #1554

Updates API key error message from no user for key to Authentication failed. The API Key may be invalid or no longer active.

@zack-rma zack-rma requested a review from MikeNeilson April 1, 2026 21:51
MikeNeilson
MikeNeilson previously approved these changes Apr 1, 2026
@adamkorynta
Copy link
Copy Markdown
Collaborator

It is probably worth testing specifically that the error message for an expired key should be identical to the error message for a invalid key

@zack-rma
Copy link
Copy Markdown
Collaborator Author

zack-rma commented Apr 3, 2026

Rating tests currently failing, only for latest schema. Likely introduced by merging main branch into this PR.

@MikeNeilson
Copy link
Copy Markdown
Contributor

Rating tests currently failing, only for latest schema. Likely introduced by merging main branch into this PR.

Yep, that looks like that Rating test not adding the location first, which should fail on latest if that got merged in.

.assertThat()
.statusCode(is(HttpCode.UNAUTHORIZED.getStatus()));
.statusCode(is(HttpCode.UNAUTHORIZED.getStatus()))
.body("message", is("Authentication failed. "
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, at this point we just just make it a public constant. Copying something this long and with separate lines is just asking for trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better error description for expired key

3 participants