Added HttpPnutForbiddenException

This commit is contained in:
2021-03-11 05:57:37 +00:00
parent 45fe5f4156
commit 688721b167
3 changed files with 18 additions and 2 deletions

View File

@ -5,6 +5,7 @@ namespace APnutI;
use APnutI\Exceptions\PnutException;
use APnutI\Exceptions\NotAuthorizedException;
use APnutI\Exceptions\NotFoundException;
use APnutI\Exceptions\HttpPnutForbiddenException;
class Meta
{
@ -35,6 +36,9 @@ class Meta
}if ($this->code === 401) {
throw new NotAuthorizedException($meta['error_message']);
}
if ($this->code === 403) {
throw new HttpPnutForbiddenException();
}
if ($this->code === 404) {
throw new NotFoundException();
}