zalando/tailor

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

Opened this issue · 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?