-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Modify Auth Callback Controller to support Xero errors
- adds error param validation - throw custom OAuthException if an error is found - update README to describe error handling for Laravel 8-11
- Loading branch information
1 parent
87fb327
commit d4a49e3
Showing
3 changed files
with
95 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Webfox\Xero\Exceptions; | ||
|
||
use Exception; | ||
use Throwable; | ||
|
||
class OAuthException extends Exception | ||
{ | ||
public function __construct($message, $code = 0, Throwable $previous = null) | ||
{ | ||
parent::__construct($message, $code, $previous); | ||
} | ||
|
||
public function __toString() | ||
{ | ||
return __CLASS__ . ": [{$this->code}]: {$this->message}\n"; | ||
} | ||
} |