Skip to content

Commit

Permalink
should fix #8 error exception
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed Mar 30, 2022
1 parent adfc957 commit e09d614
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LaravelRequestDocs.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function appendRequestRules(array $controllersInfo)
if ($requestClass && method_exists($requestClass, 'rules')) {
try {
$controllersInfo[$index]['rules'] = $this->flattenRules($requestClass->rules());
} catch (Exception $e) {
} catch (Throwable $e) {
// disabled. This only works when the rules are defined as 'required|integer' and that too in single line
// doesn't work well when the same rule is defined as array ['required', 'integer'] or in multiple lines such as
// If your rules are not populated using this library, then fix your rule to only throw validation errors and not throw exceptions
Expand Down

0 comments on commit e09d614

Please sign in to comment.