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

type should be removed from HTTP responses #3067

Closed
brianraymor opened this issue Aug 9, 2022 · 4 comments
Closed

type should be removed from HTTP responses #3067

brianraymor opened this issue Aug 9, 2022 · 4 comments
Assignees

Comments

@brianraymor
Copy link

@brianraymor commented on Tue Aug 09 2022

See curation-api. If type is never set, it is meaningless to include this field.

{'detail': 'Unable to parse authentication token.',
 'status': 401,
 'title': 'Invalid Authentication Credentials',
 'type': 'about:blank'}
@danieljhegeman
Copy link
Contributor

Ok so I can get this type removed from the error response text for most errors, but not all. Anything that is rejected by 'Swagger API definition'-level configuration, such as Auth errors (401), I have not figured out how to get access to--anything ahead of the Flask layer. Some others report similar issues with Connexion and it is not clear it is easily resolvable.

Given that, should we just leave type in for now and revisit it later? The options on the table are

  1. Remove type from most, but not all, error responses from the Curation API -- inconsistent error message shape
  2. Keep type in all error messages

cc @brianraymor @Bento007

@brianraymor
Copy link
Author

Given that, should we just leave type in for now and revisit it later?

I defer to @Bento007 and @ebezzi - but my sense is to leave in place and NOT revisit later (close as Won't Fix) if it's more than a finish issue. It's doubtful that we'll address in the future based on past experience.

@danieljhegeman
Copy link
Contributor

Ok. I'm fine with that. It is a very minor cosmetic detail that is surely never going to interfere with a user's programmatic handling of the error anyways.

@danieljhegeman
Copy link
Contributor

Closing as insignificant for now.

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

No branches or pull requests

2 participants