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

RFC: Make OAuth*Problem extend ProblemException instead of werkzeug #958

Closed
cognifloyd opened this issue May 23, 2019 · 2 comments · Fixed by #1649
Closed

RFC: Make OAuth*Problem extend ProblemException instead of werkzeug #958

cognifloyd opened this issue May 23, 2019 · 2 comments · Fixed by #1649

Comments

@cognifloyd
Copy link
Contributor

Description

I wonder if these should extend ProblemException instead of the werkzeug exceptions.

  • connexion.exceptions.OAuthProblem(werkzeug.exceptions.Unauthorized)
  • connexion.exceptions.OAuthResponseProblem(OAuthProblem)
  • connexion.exceptions.OAuthScopeProblem(werkzeug.exceptions.Forbidden)

I'm not sure the logic behind not using ProblemException for these. I wonder if it has something to do with making it more secure or to get better handling in Flask.
Ultimately it feels out of place when you consider adding aiohttp (and other frameworks #828 #440) support.

This is related to #955, and could be included in it, but seems slightly orthogonal to that effort.

Expected behaviour

Don't extend a framework specific exception inside Zalando core.

Actual behaviour

Aiohttp ends up using the werkzeug exceptions.

Steps to reproduce

Read the code.

@cognifloyd
Copy link
Contributor Author

cognifloyd commented May 23, 2019

@cognifloyd
Copy link
Contributor Author

The code changed away from what is listed in the doc in bce907f

This section of the doc hasn't changed since added in 7a9329f

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 a pull request may close this issue.

1 participant