Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/MessageBird/Common/ResponseError.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class ResponseError

const NOT_ENOUGH_CREDIT = 25;

const CHAT_API_AUTH_ERROR = 1001;

public $errors = array ();

/**
Expand All @@ -43,6 +45,8 @@ public function __construct($body)
throw new Exceptions\BalanceException;
} elseif ($error->code === self::REQUEST_NOT_ALLOWED) {
throw new Exceptions\AuthenticateException;
} elseif ($error->code === self::CHAT_API_AUTH_ERROR) {
throw new Exceptions\AuthenticateException;
}

$this->errors[] = $error;
Expand Down