protected function invalidRequest(OAuthException $e)
{
if ($e instanceof InvalidRequestException) {
return Response::make(['errors' => ['status' => '400', 'code' => 'InvalidRequest', 'title' => 'Invalid Request', 'detail' => 'The body does not have the necessary data to process the transaction', 'source' => ['parameter' => $e->parameter]]], 400);
}
if ($e instanceof InvalidRefreshException) {
return Response::make(['errors' => ['status' => '400', 'code' => 'InvalidRefreshToken', 'title' => 'Invalid Refresh Token', 'detail' => 'The refresh token is invalid', 'source' => ['parameter' => $e->parameter]]], 400);
}
}