Skip to content

Commit

Permalink
Return the result of onFail closures in middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
stancl committed Apr 6, 2020
1 parent 5dc8047 commit 4f5ef6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Middleware/InitializeTenancy.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function handle($request, Closure $next)
try {
tenancy()->init($request->getHost());
} catch (TenantCouldNotBeIdentifiedException $e) {
($this->onFail)($e);
return ($this->onFail)($e);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Middleware/InitializeTenancyByRequestData.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function handle($request, Closure $next)
try {
$this->initializeTenancy($request);
} catch (TenantCouldNotBeIdentifiedException $e) {
($this->onFail)($e);
return ($this->onFail)($e);
}
}

Expand Down

0 comments on commit 4f5ef6f

Please sign in to comment.