Hi, Java Techie, can I ask, is there any way to get the specific error from the endpoint? Like for example, the endpoint via Postman returns id already exist, can we get this error also in HTTP Interface Web Client implementation?
Hi Basant, i have a doubt. here is the productMono object i have. Mono productMono = productRepository.findById(id); Now I want to put a condition like if( productMono == null), is not working. Because ProductMenu is returning "MonoUsingWhen" Also i tried as below: Mono productMono = productRepository.findById(id).switchIfEmpty(null). the above statement is always returning null. So could you tell me how to write the condition for the above statement? Please help me Basant.. thanks/Raghu God bless you, Stay safe.
Hi Basanth How to get the Exception Object from this response and pass it to Global ExceptionHandler method ?
Excellent explanation..!!!
Hi, Java Techie, can I ask, is there any way to get the specific error from the endpoint?
Like for example, the endpoint via Postman returns id already exist, can we get this error also in HTTP Interface Web Client implementation?
Yes you can customize your error
Hi sir, how to write test cases for 4xx and 5xx error
How can i log the json body of the response? @Java Techie ?
Use this th-cam.com/video/2YTGgHkJg2M/w-d-xo.html
Hi Basant, i checked this video, but 5XXEXception is not working as Netty server is not supporing..
thanks
I will check this Raghu
@@Javatechie thanks basant. Actually today i tried 5xxx and 4xxexception with ResponseStausException (spring 5) class and it worked for me. 👍
Great I will work with this update one
Is it really necessary to write all that boilerplate code? I honestly expected there will be some configuration variable to simply turn on logging...
Hi Basant, i have a doubt. here is the productMono object i have.
Mono productMono = productRepository.findById(id);
Now I want to put a condition like if( productMono == null), is not working. Because ProductMenu is returning "MonoUsingWhen"
Also i tried as below:
Mono productMono = productRepository.findById(id).switchIfEmpty(null).
the above statement is always returning null.
So could you tell me how to write the condition for the above statement?
Please help me Basant..
thanks/Raghu God bless you, Stay safe.
Okay here from jpa return Optional
This is nice , but is there a way we can handle error if the microservice is down and throw our own custom exception?
Yes you can implement Fallback mechanism
Am calling a 3rd party api and how to log the Actual response body that is coming back? This example only talk about logging the
How to log request body and response body?
Can't you use logger sl4j ?
Hi, Please add Junit for 500 Internal Server Error code(OnStatus ) using weblient.This will be great help if you provide.
plse add a video for testing webclint using mockito
Okay I will
nice video
Pls.zoom video while recording
Hi, it was very usefull. Could you do something how to call https with WebClient.
but what is my pendind number
what?
She suggested some topics for video which I didn't deliver yet that's why she asked this .
Тело запроса-то нихрена не залогировал