Module: Twirp
- Defined in:
- lib/twirp/error.rb,
lib/twirp/client.rb,
lib/twirp/service.rb,
lib/twirp/version.rb,
lib/twirp/encoding.rb,
lib/twirp/service_dsl.rb
Defined Under Namespace
Modules: Encoding, ServiceDSL Classes: Client, ClientResp, Error, Service
Constant Summary collapse
- ERROR_CODES_TO_HTTP_STATUS =
Valid Twirp error codes and their mapping to related HTTP status. This can also be used to check if a code is valid (check if not nil).
{ canceled: 408, # RequestTimeout invalid_argument: 400, # BadRequest deadline_exceeded: 408, # RequestTimeout not_found: 404, # Not Found bad_route: 404, # Not Found already_exists: 409, # Conflict permission_denied: 403, # Forbidden unauthenticated: 401, # Unauthorized resource_exhausted: 403, # Forbidden failed_precondition: 412, # Precondition Failed aborted: 409, # Conflict out_of_range: 400, # Bad Request internal: 500, # Internal Server Error unknown: 500, # Internal Server Error unimplemented: 501, # Not Implemented unavailable: 503, # Service Unavailable data_loss: 500, # Internal Server Error }
- ERROR_CODES =
List of all valid error codes in Twirp
ERROR_CODES_TO_HTTP_STATUS.keys
- VERSION =
"0.4.1"