
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Response SQL errors in ESB API
Hi,
i created a Rest-Call for adding data into a database.
My problem is that I don't realize when the SQL command encounters an error. This can be, for example, when fields are missing. In this case, I still send back a 200. How can I send the SQL error as a response body and a corresponding status code?
Best Regards
Patrick

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @patrickkahle ,
In your web services add this and you can also check the die on error in your tDBOutput.
Example during a ko connection the web service will see this again :
Best Regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
actually, thats not working for me.
It seems that the log catcher is not triggered. When I send a request with postman, I get a 200 back in response to my request.
But in Talend i get an error
Best Regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It doesn't work with the setting either. For whatever reason, it continues with the row settings even though an error occurs. What would exception handling look like for routes?
Greetings

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For routes you can use the cErrorHandler and cOneException components to catch errors on your web services.
https://help.qlik.com/talend/fr-FR/mediation-components/8.0/mediation-logs-and-errors/cerrorhandler
Otherwise for your web services developed with tRESTRequest, I think you need to make a small modification to the design of your job as below to catch the exception during the error in tDBOUput.
Best Regards
