Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Commit

Permalink
[#iocit-378] remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
gquadrati committed Apr 12, 2023
1 parent 732d783 commit 57e2e4b
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions utils/errors.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
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";
import { CosmosErrors } from "@pagopa/io-functions-commons/dist/src/utils/cosmosdb_model";
import { NonEmptyString } from "@pagopa/ts-commons/lib/strings";
import { errorsToReadableMessages } from "@pagopa/ts-commons/lib/reporters";
import {
IResponse,
IResponseErrorInternal,
IResponseErrorNotFound,
ResponseErrorInternal,
Expand Down Expand Up @@ -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 = <R, T extends IResponse<R>>(
context: Context,
returnValue: T,
logDetail?: string
): T => {
context.log.error(
`${returnValue.detail}${logDetail ? ` | ${logDetail}` : ""}`
);
return returnValue;
};

0 comments on commit 57e2e4b

Please sign in to comment.