Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Niki1
Contributor
Contributor

tRESTResponse - multiple response based on different conditions

How to make custom return status code and return different responses based on different conditions.

 

I have a POST request and based on the insert in database or not I want to return success or error in tRESTResponse, how do I do that? Can someone please guide ???

(eg - error can be due to datatype mismatch in input and database field) checking and returning error accordingly in tRESTResponse

Labels (3)
2 Replies
TRF
Champion II
Champion II

Store return code in a global variable to be reused in tRESTResponse.

Here is an example:

0683p000009M7Ft.png

Niki1
Contributor
Contributor
Author

I am a beginner in Talend. I have a tDBOutput component and want to capture the error like violation of unique constraint or input that exceeds field size.

ORA-12899: value too large for column Unit or ORA-00001: unique constraint (UNKNOWN.obj#=265738) violated. How to I get the error code and return response accordingly based on success of failure ?