Techiio-author
Started by Bruce MccullamSep 23, 2021

Open
How to return a Mono empty object such that it is accepted by the application/json format?

0 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWES SHARE

I am using an exception function for my http request. For my task I need to read the response and if it is giving Internal Server Error, we have to return a null object. I tried using Mono.empty() as the exception function only takes mono as returned object. But now I get the error for UnsupportedMediaTypeException: Content type 'text/html;charset=UTF-8' not supported Is there a way to return a Mono that is empty without encountering this error.

0 Replies

You must be Logged in to reply
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance