Skip to main content
Solved

DQC online service - override the response code?

  • 19 July 2024
  • 2 replies
  • 25 views

Hi DQC online service experts,

I have built an online service that writes data into RDM using Rdm importer.

 

I put some validation logic into the component so that it would reject bad records from being written (e.g. value supplied does not exist in parent table).

 

The rdm importer is going straight to confirm mode as we need the data to be automatically published and available.

 

I've configured the integration output to provide the primary key and my explanation in the case that the component rejects the record.

 

The app that is sending the data, are now saying that even if I provide an error explanation, the endpoint still provides a 200 response code. They have some in built error handling capability that they want to use, but they currently can't use it because the server responds 200.

 

Is it possible for me to set a different response code e.g. 400, based on the data that is provided in the integration output?

2 replies

Userlevel 5
Badge +2

Hi @maykwok_hamilton,

This is not possible. If your plan executes successfully, the result code will always be 200. There are some tactics to intentionally break your plan by raising an error or manipulating the output format, but these are very limited. The error message would simply be "Configuration execution failed" without any additional details.

Userlevel 3
Badge +2

Thanks @AKislyakov 

Reply