Skip to content

Commit

Permalink
Implement missing failure exception
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiasgeniar committed May 5, 2020
1 parent 57f32db commit b7273f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Exceptions/WebhookFailed.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public static function missingType(Request $request)
return new static('The webhook call did not contain a type. Valid OhDear webhook calls should always contain a type.');
}

public static function jobClassDoesNotExist($jobClass, $ohDearWebhookCall)
{
return new static('The '. $jobClass .' class does not exist.');
}

public function render($request)
{
return response(['error' => $this->getMessage()], 400);
Expand Down

0 comments on commit b7273f7

Please sign in to comment.