tailor icon indicating copy to clipboard operation
tailor copied to clipboard

Need to change the response status code when rendered the fallback url.

Open Pragnesh-Er2007 opened this issue 3 years ago • 0 comments

I want to change response status code when fragment request send to call fallback url. Which is set in request-handler.js

fragment.once('fallback', err => {
this.emit('error', request, err);
            span.setTag(Tags.HTTP_STATUS_CODE, 500);
            response.writeHead(500, responseHeaders);
            resultStream.pipe(contentLengthStream).pipe(response);
  });

Our fragment is already handle this error means underlying fragment is down so render the fallback url so it is handle error so we need to return 200 in place 500. So we have any extension where we need to change this status code?

Pragnesh-Er2007 avatar Aug 13 '20 14:08 Pragnesh-Er2007