class Obsctl::IPC::ErrorPayload

Overview

Stable error payload returned for failed IPC command requests.

Defined in:

obsctl/ipc/response.cr

Constant Summary

SENSITIVE_KEY_PATTERN = "(?:password|authentication(?:[ _-]?string)?|auth(?:[ _-]?string)?|token|secret)"
SENSITIVE_VALUE_PATTERN = "(?:\"[^\"]*\"|'[^']*'|\\S+)"

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.from_exception(error : Domain::ObsctlError) : self #

[View source]
def self.new(code : String, message : String) #

[View source]
def self.server_error : self #

[View source]

Class Method Detail

def self.sanitize_message(message : String) : String #

[View source]

Instance Method Detail

def code : String #

[View source]
def message : String #

[View source]
def to_json(json : JSON::Builder) : Nil #

Writes the wire-format JSON object for this error.


[View source]