Skip to content

Interface client methods that return InputStreams do not throw exceptions on bad HTTP status codes #35375

@philwebb

Description

@philwebb

Given the following:

@HttpServiceClient("example")
public interface ExampleClient {

	@GetExchange("/{id}")
	InputStream picture(@PathVariable int id);

}

I would expect calls to picture to throw an exception if HTTP 404 is returned. This is currently not the case (at least with RestClient backed interfaces.

I suspect this call will need to be updated so that the ExchangeFunction checks the status code.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions