Skip to content

BadRequestExceptionResponse mapping is broken #287

@Zakhar2093

Description

@Zakhar2093

When I try to authenticate with an invalid code, I get a meaningless exception

        try {
            workos.userManagement.authenticateWithCode(clientId, "some invalid code", null);
        } catch (Exception e) {
            log.error(e.getMessage());
        }
Image

The reason of this is this line
The actual payload we have:

{
  "error" : "invalid_grant",
  "error_description" : "The code 'D01K0EWQ9V6SYP9F5D14QPHBQ8Edd' has expired or is invalid."
}

But we try to map it to BadRequestExceptionResponse which has completely different fields, so everything is null there

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