This patch simply contains a few additional convenience functions in the rpc/errors
package:
Status(err error) int
to infer the most appropriate HTTP status code for the given error.IsNotFound()
,IsBadRequest()
, etc to test if any error is (at any level of unwrapping) that type.Unexpected()
as a shorthand forInternalServerError()