Module: Smspilot::Error

Defined in:
lib/smspilot/errors.rb

Defined Under Namespace

Classes: ApiError, ApiKeyBlocked, ApiKeyInvalid, ApiKeyRequired, FromDeprecatedError, FromInvalidError, IdInvalidError, InputDataRequiredError, InputListInvalidError, InvalidJsonError, InvalidJsonResponseError, InvalidResposeStatusError, InvalidSmsCheckListError, IpRestrictionError, NotEnoughCreditsError, PacketIdInvalidError, ServerIdInvalidError, ServerIdNotFoundError, ServerIdRequiredError, ServerPacketIdInvalidError, SmsCountLimitError, SystemError, TextRequiredError, TextTooLongError, TimeoutError, ToDeprecatedError, ToInvalidError, ToRequiredError, UnknownApiError, UnknownCommandError, UnknownInputFormatError, UnsupportedZoneError, UserNotFoundError

Constant Summary collapse

API_ERROR_CODES =
{
  "10" => "InputDataRequiredError",
  "11" => "UnknownInputFormatError",
  "12" => "InvalidJsonError",
  "14" => "UnknownCommandError",
  "100" => "ApiKeyRequired",
  "101" => "ApiKeyInvalid",
  "106" => "ApiKeyBlocked",
  "110" => "SystemError",
  "113" => "IpRestrictionError",
  "201" => "FromInvalidError",
  "202" => "FromDeprecatedError",
  "210" => "ToRequiredError",
  "211" => "ToInvalidError",
  "212" => "ToDeprecatedError",
  "213" => "UnsupportedZoneError",
  "220" => "TextRequiredError",
  "221" => "TextTooLongError",
  "230" => "IdInvalidError",
  "231" => "PacketIdInvalidError",
  "240" => "InputListInvalidError",
  "241" => "NotEnoughCreditsError",
  "242" => "SmsCountLimitError",
  "300" => "ServerIdRequiredError",
  "301" => "ServerIdInvalidError",
  "302" => "ServerIdNotFoundError",
  "303" => "InvalidSmsCheckListError",
  "304" => "ServerPacketIdInvalidError",
  "400" => "UserNotFoundError"
}