exemple of good implementation :
No need to include the decodedToken in the log->error() arguments, it's already in the log context.
try
{
$validToken = $this->spotfireAccessDBService->grantAccess($userId ,$ulId, $this->settings['appSettings']['sessionLength' ]);
$this->response->getBody()->write(json_encode(new GetSpotfireTokenResponse($validToken->token, $validToken->token_expiration)));
return $this->response;
}
catch(Throwable $exception)
{
$this->logger->error("Error while getting Spotfire access token",["validToken"=>$validToken]);
return $this->response->withStatus(500, "Error while getting Spotfire access token") ;
}
exemple of good implementation :
No need to include the decodedToken in the log->error() arguments, it's already in the log context.