We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given this feign client:
`interface UserClient {
@RequestLine("GET /users/{name}") fun getUser(@Param("name") name: String): Optional<User>
}`
val userClient = Feign.builder() .encoder(JacksonEncoder(objectMapper)) .decoder(OptionalDecoder(JacksonDecoder(objectMapper))) .target(UserClient::class.java, BASE_URL)
when I unit test this:
` WireMock.stubFor( WireMock.get("/users/test") .willReturn(WireMock.notFound()) )
userClient.getUser("test")
`
I'm getting this exception: [404 Not Found] during [GET] to [http://localhost:7070/users/test] [UserClient#getUser(String)]: []
And I was expecting to actually get an empty optional.
The text was updated successfully, but these errors were encountered:
@ramgom try to use dismiss404():
val userClient = Feign.builder() .dismiss404() .encoder(JacksonEncoder(objectMapper)) .decoder(OptionalDecoder(JacksonDecoder(objectMapper))) .target(UserClient::class.java, BASE_URL)
I think it should help you.
Sorry, something went wrong.
No branches or pull requests
Given this feign client:
`interface UserClient {
}`
val userClient = Feign.builder() .encoder(JacksonEncoder(objectMapper)) .decoder(OptionalDecoder(JacksonDecoder(objectMapper))) .target(UserClient::class.java, BASE_URL)
when I unit test this:
`
WireMock.stubFor(
WireMock.get("/users/test")
.willReturn(WireMock.notFound())
)
`
I'm getting this exception: [404 Not Found] during [GET] to [http://localhost:7070/users/test] [UserClient#getUser(String)]: []
And I was expecting to actually get an empty optional.
The text was updated successfully, but these errors were encountered: