class Srcom::CodeException

Overview

This exception is raised in Api#request and Api#request_single_item when a request fails with an API error response that has a descriptive message and support links.

Defined in:

srcr/exceptions.cr

Constructors

Instance Method Summary

Instance methods inherited from class Srcom::StatusException

message message, response : HTTP::Client::Response response, status_code : Int32 status_code, status_message : String status_message, to_s(io) to_s

Constructor methods inherited from class Srcom::StatusException

new(response : HTTP::Client::Response) new

Constructor Detail

def self.new(response : HTTP::Client::Response, error : APIError) #

[View source]

Instance Method Detail

def error : APIError #

[View source]
def error_message : String #

The API error message that was returned by Srcom, for example "Game <id> could not be found" or "The submitted run does not validate against the schema. See the errors attached.".


[View source]
def message #

[View source]
def to_s(io) #

[View source]