Skip to content

Internal server error when qbo api call response not ok #6

@michielbdejong

Description

@michielbdejong

To reproduce, revoke the token and then try to do an API call:

Internal Server Error: /quickbooks/qbo_request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/michiel/gh/pondersource/peppol-python-demo/quickbooks/views.py", line 122, in qbo_request
    return HttpResponse(' '.join([response.content, str(response.status_code)]))
TypeError: sequence item 0: expected str instance, bytes found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions