Skip to content

Error type #216

@frankier

Description

@frankier

Currently errors are thrown as strings using error. This makes handling a bit annoying. It may be that if there is a 404 error, this is considered useful information (i.e. the corresponding object does not exist). When handling the error the user would then want to do:

try
    GitHub.something(...)
catch e
    if e.status == 404
        do_something()
    else
        throw e
    end
end

But since there is no error type and error(...) is used instead we just get an ErrorException and we would have to parse back out the error code if we wanted it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions