Skip to content

v1.1.3

Latest
Compare
Choose a tag to compare
@robsignorelli robsignorelli released this 24 May 15:18
· 1 commit to main since this release
73cf5c7

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 for InternalServerError()