sillsdev / sillsdev/languageforge-lexbox
HTTP errors from command-runner.sh should be returned as-is, not be changed into 500s
@rmunn is already working on this.
Since Mar 19, 2026.
- Dominant language
- C#
- Stars
- 9
- Forks
- 8
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 49
Description
Describe the bug
Currently, the HgService.cs code uses response.EnsureSuccessStatusCode() to check for 200-299 status, and throws an exception if the status isn't 2xx. But the command-runner.sh script is carefully producing specific HTTP error codes like 404 or 400, which are being swallowed by EnsureSuccessStatusCode() as the exception means they all get turned into 500. I want to pass the codes from command-runner.sh back to the caller when appropriate (which is most, but not all, of the time).
Expected behavior
When command-runner.sh returns a 400 or 404, the HTTP client should receive that 400 or 404, not a 500. In some cases the 500 is appropriate, to be decided on a case-by-case basis.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.