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
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.
The text was updated successfully, but these errors were encountered:
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:But since there is no error type and
error(...)
is used instead we just get anErrorException
and we would have to parse back out the error code if we wanted it.The text was updated successfully, but these errors were encountered: