Customize REST Error Response???

asked 2019-01-30 09:15:47 -0600

daveh gravatar image

updated 2019-02-13 09:05:33 -0600

Is there a way to customize the REST Microservice Pipeline's error response. Our enterprise has a standardized error response that differs from the the one generated by StreamSets. Sure would be sweet to be able to generate our own response.

Thanks.


Addendum:

Pipeline screeny:

image description

Example of error response payload we would like to have the pipeline return when appropriate:

{
    “errors” : [
                {
                    “code”: “XXXX”,
                    “message”: “Please enter valid pcID”,
                    “message_language”: “ENG”,
                    “message_language_locale”: “USA”,
                    “internal_code”: “26-10-8”,
                    “detailed_stack_info”: http://our.domain.com/api/fail/customer,
                    “fail_count” : “1”
                }
            ]
 }

Where XXXX is the HTTP Code which could be a 522 for downstream processing issue or a 403 forbidden, etc. This response body then would replace the default one generated by the stages.

Thanks again.

P.S. sorry for late response.... TOO MUCH WORK!!!

edit retag flag offensive close merge delete

Comments

Can you give an example of one of your pipelines? I think there's a way to do this.

metadaddy gravatar imagemetadaddy ( 2019-01-30 10:24:09 -0600 )edit

Not sure how to provide example. I could upload the exported json, but not sure how to do that, as I don't see an 'attachment' link anywhere. Suggestions??? Thanks.

daveh gravatar imagedaveh ( 2019-02-01 14:56:30 -0600 )edit

Editing your question and adding a screenshot of the pipeline, with a bit more explanation of what you'd like to achieve would be great.

metadaddy gravatar imagemetadaddy ( 2019-02-01 15:29:29 -0600 )edit

Mr. metadaddy, I hope this helps

daveh gravatar imagedaveh ( 2019-02-13 09:05:59 -0600 )edit