Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Response Body and Status Code #1818

Open
qoomon opened this issue Apr 11, 2023 · 1 comment
Open

Set Response Body and Status Code #1818

qoomon opened this issue Apr 11, 2023 · 1 comment
Labels

Comments

@qoomon
Copy link

qoomon commented Apr 11, 2023

Feature Request

Is your feature request related to a problem? Please describe.
I'd like to manually set the Response Body and Status Code e.g.

app.on("workflow_job.queued", async (context) => {
       context.res.status(400);
       context.res.send('None shall pass');
});

Currently the response code is always 200 even if an error got thrown. e.g.

app.on("workflow_job.queued", async (context) => {
       throw new Error('Boom');
});
@welcome
Copy link

welcome bot commented Apr 11, 2023

Thanks for opening this issue. A contributor should be by to give feedback soon. In the meantime, please check out the contributing guidelines and explore other ways you can get involved.

eventwiki added a commit to eventwiki/probot that referenced this issue Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants