You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When requesting the merge requests for a non existing project, e.g. /api/v4/projects/42/merge_requests, the FileNotFoundException caught in GitlabHTTPRequestor is wrapped in a RuntimeException and thrown out uncaught.
I propose to replace the RuntimeException with UncheckedIOException, then catch the UncheckedIOException, unwrap and rethrow the IOException at the API border. This way consumers of the API know exactly what happened to them.
In 4.0.0 threw an Error and was improved in 4.1.0 to throw RuntimeException (#281), so threads are not killed.
I can prepare a PR if you like the proposal.
The text was updated successfully, but these errors were encountered:
When requesting the merge requests for a non existing project, e.g.
/api/v4/projects/42/merge_requests
, the FileNotFoundException caught in GitlabHTTPRequestor is wrapped in a RuntimeException and thrown out uncaught.I propose to replace the RuntimeException with UncheckedIOException, then catch the UncheckedIOException, unwrap and rethrow the IOException at the API border. This way consumers of the API know exactly what happened to them.
In 4.0.0 threw an Error and was improved in 4.1.0 to throw RuntimeException (#281), so threads are not killed.
I can prepare a PR if you like the proposal.
The text was updated successfully, but these errors were encountered: