admin管理员组

文章数量:1355628

I have a rest call in PL/SQL that create a record in the database and that returns a response with the whole record back. This works fine.

But now I want to return a warning message when a certain record already exists, it isn't an error and it can be that the record can be valid like this. But it is just a warning to inform the end-user of this fact.

I read about using HTML code 199 for this. But I want to know how exactly I should deliver the message in the output from PL/SQL code. Can someone give an example of this?

I have a rest call in PL/SQL that create a record in the database and that returns a response with the whole record back. This works fine.

But now I want to return a warning message when a certain record already exists, it isn't an error and it can be that the record can be valid like this. But it is just a warning to inform the end-user of this fact.

I read about using HTML code 199 for this. But I want to know how exactly I should deliver the message in the output from PL/SQL code. Can someone give an example of this?

Share Improve this question edited Mar 28 at 14:58 jonrsharpe 122k30 gold badges268 silver badges475 bronze badges asked Mar 28 at 14:55 nightfox79nightfox79 2,1393 gold badges30 silver badges44 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

According to Wikipedia HTTP status code 199 is obsolete, so you should not use it.

Could you not just send back a 200 (OK) status and add a "warnings" node to the response, so that the caller can act on the warnings if it wants to, or ignore them?

本文标签: restHow to send a warning in a PLSQL successful responseStack Overflow