Repository navigation
Commit 6232506
committed
Fix TypeError returned when insufficient Authorization
If app doesn't have authentication rights, then the code sends a type error. Fixed by wrapping casting response.content to string -- user can then see the authorization error message in the app.
Error: SampleOAuth2_UsingPythonClient\app\views.py", line 122, in qbo_request
return HttpResponse(b' '.join([response.content, str(response.status_code)]))
TypeError: sequence item 1: expected a bytes-like object, str found1 parent 42bd1e6 commit 6232506
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
0 commit comments