Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(checkout): Error Response when wrong api key is passed #596

Merged
merged 2 commits into from
Feb 16, 2023
Merged

Conversation

Abhicodes-crypto
Copy link
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates

Description

When wrong API key is passed checkout returns b"" as response body which results in ParsingError and returns the end response as Internal Server Error. This PR fixes that by send Invalid Api Key message when the response body is empty and status code is 401.

Additional Changes

  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Manual

Before
image

After
image

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@Abhicodes-crypto Abhicodes-crypto requested a review from a team as a code owner February 15, 2023 10:09
@Abhicodes-crypto Abhicodes-crypto self-assigned this Feb 15, 2023
@Abhicodes-crypto Abhicodes-crypto added A-connector-integration Area: Connector integration C-bug Category: Bug S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Feb 15, 2023
Copy link
Member

@vspecky vspecky left a comment

Choose a reason for hiding this comment

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

LGTM

@jarnura jarnura removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Feb 16, 2023
@jarnura jarnura enabled auto-merge February 16, 2023 13:01
@jarnura jarnura added this pull request to the merge queue Feb 16, 2023
Merged via the queue into main with commit 55b6d88 Feb 16, 2023
@jarnura jarnura deleted the cko-error branch February 16, 2023 13:47
@jarnura jarnura mentioned this pull request Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-integration Area: Connector integration C-bug Category: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants