nylas/nylas-python

NylasOAuthError `status_code` is filled into `request_id`

Closed this issue · 1 comments

Describe the bug
Wrong positional arguments passed to the constructor of the AbstractNylasApiError.

super().__init__(oauth_error.error_description, status_code)

class AbstractNylasApiError(Exception):
"""
Base class for all Nylas API errors.
Attributes:
request_id: The unique identifier of the request.
status_code: The HTTP status code of the error response.
"""
def __init__(
self,
message: str,
request_id: Optional[str] = None,
status_code: Optional[int] = None,
):

To Reproduce
Not necessary as it's clear from the linked code.

Expected behavior
status_code contains the actual status code.

SDK Version:
v6.3.0

@sambuysse Great catch, thanks for reporting!