Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

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

Open
Pragnesh-Er2007 opened this issue Aug 13, 2020 · 0 comments

Comments

@Pragnesh-Er2007
Copy link

Pragnesh-Er2007 commented Aug 13, 2020

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant