Skip to content

Throwing an Error when an IOException occurs is overly fatal #65

@ryankennedy

Description

@ryankennedy

https://github.com/kohsuke/github-api/blob/master/src/main/java/org/kohsuke/github/Requester.java#L268

When attempting to get the details of an empty repository, the github enterprise server returns an HTTP 409. This, in turn, causes Requester to throw an Error…

Caused by: java.io.IOException: Server returned HTTP response code: 409 for URL:

An Error, for those unfamiliar, is "a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch." I don't think an HTTP 409 response warrants throwing an Error, thereby dooming the client Java process to exit with status code 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions