I have a program that calls GetWorkTypesForProject on each project in a YouTrack instance. Recently, someone added a project in which time tracking was disabled. YouTrack returns an HTTP 400 response with an error message when I call GetWorkTypesForProject on this project. I'd like to ignore this error, but on the C# side, I just get a HttpRequestException, which is hard to distinguish from other transient/critical HTTP errors like 503.
Expected behavior
Calling GetWorkTypesForProject() when time tracking is disabled throws an informative exception (YouTrackErrorException?)
Actual behavior
Calling GetWorkTypesForProject() when time tracking is disabled throws an HttpRequestException.
Steps to reproduce the behavior
Call TimeTrackingService.GetWorkTypesForProject() on a project in which time tracking is disabled.
I have a program that calls GetWorkTypesForProject on each project in a YouTrack instance. Recently, someone added a project in which time tracking was disabled. YouTrack returns an HTTP 400 response with an error message when I call GetWorkTypesForProject on this project. I'd like to ignore this error, but on the C# side, I just get a HttpRequestException, which is hard to distinguish from other transient/critical HTTP errors like 503.
Expected behavior
Calling GetWorkTypesForProject() when time tracking is disabled throws an informative exception (YouTrackErrorException?)
Actual behavior
Calling GetWorkTypesForProject() when time tracking is disabled throws an HttpRequestException.
Steps to reproduce the behavior
Call TimeTrackingService.GetWorkTypesForProject() on a project in which time tracking is disabled.