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

32 if user inputs an invalid api key it should return the header titledetail when requesting #33

Conversation

rachmaninoffpk
Copy link
Collaborator

This closes #32 .

Copy link
Collaborator

@brown-jason brown-jason left a comment

Choose a reason for hiding this comment

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

Tested a couple of endpoints with invalid api keys and got details in response.

get_genetox_summary_batch(DTXSID = c('DTXSID7020182'), API_key = 'wrong_key')
Error in get_genetox_summary_batch(DTXSID = c("DTXSID7020182"), API_key = "wrong_key") :
Please contact API admin for requesting a valid API key. Key wrong_key not found.
get_genetox_summary_batch(DTXSID = c('DTXSID7020182'), API_key = NULL)
Error in get_genetox_summary_batch(DTXSID = c("DTXSID7020182"), API_key = NULL) :
Every API call should pass assigned API key through custom http header or query parameter. Request is missing x-api-key.
get_genetox_summary_batch(DTXSID = c('DTXSID7020182'))
Error in get_genetox_summary_batch(DTXSID = c("DTXSID7020182")) :
Every API call should pass assigned API key through custom http header or query parameter. Request is missing x-api-key.

@rachmaninoffpk rachmaninoffpk merged commit 3d57d54 into dev Nov 7, 2024
1 check passed
@brown-jason
Copy link
Collaborator

I think that the specific situation where the user does not input a key at all might need more guidance than the given response from the api, but maybe outside of the scope of this ticket.

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.

If user inputs an invalid API key it should return the header title/detail when requesting
2 participants