Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #12809
Closed
Open
Issue created Jul 08, 2022 by Administrator@rootContributor

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

Created by: 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.

Assignee
Assign to
Time tracking