Skip to content

[Question] How to capture 403 response from generated APIClient (java/webclient) #12809

Open
@rocb

Description

@rocb

I generated a client using generatorName java and library webclient. The generate api client works the service side REST api returns success. But when I get a HTTP 403 response, the block() call just hangs.

Code is like this:

ReportsApi reportApi = new ReportsApi();
Mono rsp = reportApi.reportsGetDatasourcesInGroup(UUID.fromString(workspaceId), UUID.fromString(reportId));
Datasources ds= rsp.block();

I attempt to add .onErrorMap() and other on the Mono object, with no luck.

I know why I am getting 403 from the server, but I just need to be able to capture it in code so I can do the appropriate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AnnouncementProject/release related announcements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions