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

Send a better response when an error occurred #53

Open
evans-g-crsj opened this issue Nov 25, 2019 · 1 comment
Open

Send a better response when an error occurred #53

evans-g-crsj opened this issue Nov 25, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@evans-g-crsj
Copy link
Contributor

An error 504 (Timeout) is received when a bad request (at least the following one) is made.

When the profile is updated but one of it's field is invalid a timeout occurs. For instance,

if profile = {...roles: ['researcher'], ...} is written like this profile = {...role: 'researcher', ...} then a 504 is received.

steps to reproduce
/////////////////////////////////
Endpoint: https://kf-persona-api-qa.kidsfirstdrc.org/graphql
/////////////////////////////////
graphql query :

mutation($record: UpdateByIdUserModelInput!) {
userUpdate(record: $record) {
record {

_id
title
firstName
lastName
egoId
roles
acceptedTerms
email
institutionalEmail
eraCommonsID
department
story
bio
jobTitle
institution
addressLine1
addressLine2
city
state
country
zip
phone
website
googleScholarId
twitter
facebook
github
linkedin
orchid
interests
acceptedKfOptIn
acceptedNihOptIn
acceptedDatasetSubscriptionKfOptIn
isPublic
sets {
name
size
type
setId
}
}
}
}
/////////////////////////////////
variables :
{"variables":{"record":{"_id":"5d5d9905b70d02001a173fb8","title":"dr","firstName":"Evans","lastName":"Girard","egoId":"64da5ffa-871e-4f2f-bee9-6d2508ae9786","roles":["research"],"acceptedTerms":true,"email":"[email protected]","institutionalEmail":"[email protected]","eraCommonsID":"","department":"department","story":"","bio":"Here's a test for my bio ","jobTitle":"A very good role","institution":"this is an institution","addressLine1":"1425 309 rue DesCypres","addressLine2":"address 2","city":"Trrr","state":"Qc","country":"Canada","zip":"11111111111","phone":"","website":"https://www.mysite.com","googleScholarId":"","twitter":"www.twitter/test.com","facebook":"https://www.facebook/test.com","github":"www.github/test.com","linkedin":"https://www.linkedin/test.com","orchid":"orcidid3784738437","interests":["ewing sarcoma: genetic risk","cancer","childhood cancer"],"acceptedKfOptIn":false,"acceptedNihOptIn":false,"acceptedDatasetSubscriptionKfOptIn":false,"isPublic":true,"sets":[],"role":"research"}},"query":"mutation($record: UpdateByIdUserModelInput!) {userUpdate(record: $record) {record {_idtitlefirstNamelastNameegoIdrolesacceptedTermsemailinstitutionalEmaileraCommonsIDdepartmentstorybiojobTitleinstitutionaddressLine1addressLine2citystatecountryzipphonewebsitegoogleScholarIdtwitterfacebookgithublinkedinorchidinterestsacceptedKfOptInacceptedNihOptInacceptedDatasetSubscriptionKfOptInisPublicsets {namesizetypesetId}}}}"}
/////////////////////////////////

@evans-g-crsj evans-g-crsj added backend enhancement New feature or request labels Nov 25, 2019
@jberube jberube added bug Something isn't working and removed backend enhancement New feature or request labels Nov 25, 2019
@jberube
Copy link
Contributor

jberube commented Nov 25, 2019

A 401 "Bad Request" should be returned in that situation : https://tools.ietf.org/html/rfc7231#section-6.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants