jenkinsci / jenkinsci/checks-api-plugin

Primary error message is not shown in error header, instead says `error in 'error' step`

Open
#124 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
49
Forks
32
Avg merge
2d 5h
Merged PRs (30d)
5

Description

### Feature Request

When I report an error like this in one of my steps:
```groovy
stage ("Submodule Check") {
steps {
script {
error "Submodules are OK for branches but cannot be merged into main"
}
}
}
```

This plugin does not report that error cleanly in the check. I expect it to show the message I reported more prominently but instead it shows information about the error step itself.

For example right in the Pull Request instead of showing that error message it simply says `error in 'error' step`:

![Screen Shot 2021-09-04 at 8 10 00 AM](https://user-images.githubusercontent.com/10974/132095706-42ca196d-40c8-4434-a174-d23121b88228.png)

Other github status checkers will show the actual error message in this part of the UI instead.

Additionaly when going to the error details it has the same message prominently in a header as well as some redundant information about an Error in the error step.

(red for bad, green for good)
![Screen Shot 2021-09-04 at 8 11 19 AM](https://user-images.githubusercontent.com/10974/132095868-aca41b76-8290-478d-a280-c9f4b1c89e3c.png)

I feel like in the case of reporting an error via the `error()` step / function, the information about that step should be omitted and the error message itself should be what is reported.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.