From 57e2e4be56dca555ea2c7d32fa8c7bcb1570a1fd Mon Sep 17 00:00:00 2001 From: gquadrati Date: Wed, 12 Apr 2023 10:24:31 +0200 Subject: [PATCH] [#iocit-378] remove unused function --- utils/errors.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/utils/errors.ts b/utils/errors.ts index fee96ff..48dd78e 100644 --- a/utils/errors.ts +++ b/utils/errors.ts @@ -1,4 +1,3 @@ -import { Context } from "@azure/functions"; import * as t from "io-ts"; import * as O from "fp-ts/lib/Option"; import { pipe } from "fp-ts/lib/function"; @@ -6,7 +5,6 @@ import { CosmosErrors } from "@pagopa/io-functions-commons/dist/src/utils/cosmos import { NonEmptyString } from "@pagopa/ts-commons/lib/strings"; import { errorsToReadableMessages } from "@pagopa/ts-commons/lib/reporters"; import { - IResponse, IResponseErrorInternal, IResponseErrorNotFound, ResponseErrorInternal, @@ -121,17 +119,3 @@ export const domainErrorToResponseError = ( error.kind === ErrorKind.NotFound ? ResponseErrorNotFound(error.kind, "Could not find requested resource") : ResponseErrorInternal(error.detail); - -/** - * Log a Response detail and return it - */ -export const logAndReturnResponse = >( - context: Context, - returnValue: T, - logDetail?: string -): T => { - context.log.error( - `${returnValue.detail}${logDetail ? ` | ${logDetail}` : ""}` - ); - return returnValue; -};