Skip to content

Commit

Permalink
🧑‍💻 update error response output
Browse files Browse the repository at this point in the history
  • Loading branch information
Cambis authored and satrun77 committed Mar 14, 2024
1 parent 4b5215c commit 141b300
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/OauthServerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

use DateInterval;
use Exception;
use GuzzleHttp\Psr7\Response;
use GuzzleHttp\Psr7\ServerRequest;
use GuzzleHttp\Psr7\Utils;
use IanSimpson\OAuth2\Entities\UserEntity;
Expand Down Expand Up @@ -336,7 +337,7 @@ public function validateClientGrant(HTTPRequest $request): HTTPResponse
try {
$server->validateAuthenticatedRequest($this->myRequest);
} catch (OAuthServerException $e) {
return new HTTPResponse($e->getMessage(), $e->getHttpStatusCode());
return $this->myResponseAdapter->fromPsr7($e->generateHttpResponse(new Response()));
}

return new HTTPResponse('', 200);
Expand Down

0 comments on commit 141b300

Please sign in to comment.