Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Conversation

@benbrown
Copy link
Contributor

Description

This PR exposes the error message from inside background build processes to the client for display.

Task Item

fixes #5783

@coveralls
Copy link

coveralls commented Feb 23, 2021

Coverage Status

Coverage remained the same at 53.96% when pulling dce22a9 on benbrown/5783 into acd3175 on main.

const result = BackgroundProcessManager.getProcessStatus(jobId);
if (result) {
res.status(result.httpStatusCode).json(result);
res.status(result.httpStatusCode).json({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we ok with sending the additional properties httpStatusCode and latestMessage in addition to the statusCode and message. Feels like the response will have duplicate fields for status code and message.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's ok -- the client is looking for statusCode and message only in order to display them in the UI. No harm in leaving the other fields in there as there other fields in that object as well that are used at times in the UI such as the history and log output of the background process.

@benbrown benbrown closed this Feb 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Send more detailed error If any step in creation fails

4 participants