generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve error exceptiosn for missing credentials
- Loading branch information
1 parent
f4abf6f
commit dfa23f3
Showing
3 changed files
with
42 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Spatie\MailcoachSdk\Exceptions; | ||
|
||
class MailcoachException extends \RuntimeException | ||
{ | ||
public static function missingApiToken(): self | ||
{ | ||
return new static('No Mailcoach API token was provided. Please provide an API token in the `mailcoach-sdk.api_token` config key.'); | ||
} | ||
|
||
public static function missingEndpoint(): self | ||
{ | ||
return new static('No Mailcoach endpoint was provided. Please provide an endpoint in the `mailcoach-sdk.endpoint` config key.'); | ||
} | ||
} |
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