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

[ ENH ] Provide headers when returning 401 failures via the Uber class #578

Closed
jshcodes opened this issue Mar 3, 2022 · 0 comments · Fixed by #584
Closed

[ ENH ] Provide headers when returning 401 failures via the Uber class #578

jshcodes opened this issue Mar 3, 2022 · 0 comments · Fixed by #584
Assignees
Labels
authentication Issues or questions regarding authentication enhancement 🌟 New feature or request uber Questions related to Uber Class usage

Comments

@jshcodes
Copy link
Member

jshcodes commented Mar 3, 2022

Describe the enhancement
When you fail authentication using the Uber class and are returned a 401, the headers branch of the Result object is empty. Populate this branch with the headers from the authentication failure.

To Reproduce
Create an instance of the Uber class using invalid authentication, then immediately make a call to the command method. When you are returned the 401, the headers branch is an empty dictionary.

{'status_code': 401, 'headers': {}, 'body': {'errors': [{'message': 'Failed to issue token.'}], 'resources': []}}

Expected behavior
The headers branch should be populated with the headers dictionary produced when the authentication failure occurs.

Environment (please complete the following information):

  • OS: All supported
  • Python: All supported
  • FalconPy: <= 1.0.5

Additional context
Authentication occurs in this scenario as a background request, resulting in these headers being discarded.

Thanks to @tsullivan06 for suggesting this enhancement.

@jshcodes jshcodes added enhancement 🌟 New feature or request uber Questions related to Uber Class usage authentication Issues or questions regarding authentication labels Mar 3, 2022
@jshcodes jshcodes self-assigned this Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authentication Issues or questions regarding authentication enhancement 🌟 New feature or request uber Questions related to Uber Class usage
Projects
None yet
1 participant