$id]) ->fetchAssoc(); if (!empty($record)) { return new ResourceResponse($record); } throw new NotFoundHttpException(t('Log entry with ID @id was not found', ['@id' => $id])); } throw new BadRequestHttpException(t('No log entry ID was provided')); } }