Skip to content

Commit

Permalink
[#IOCOM-681] fixed query param decode in get third party attachments …
Browse files Browse the repository at this point in the history
…url (#1074)

* fixed query param decode in get third party attachments url

* fixed english error in log message
  • Loading branch information
acuiuli authored Nov 22, 2023
1 parent fdf26ab commit 3313bb5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/adapters/pnFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import { PN_SERVICE_ID } from "../config";

const getPath = (input: RequestInfo | URL): string =>
input instanceof URL
? `${input.pathname}${input.searchParams}`
? `${input.pathname}${input.search}`
: typeof input === "string"
? `${new URL(input).pathname}${new URL(input).searchParams}`
: `${new URL(input.url).pathname}${new URL(input.url).searchParams}`;
? `${new URL(input).pathname}${new URL(input).search}`
: `${new URL(input.url).pathname}${new URL(input.url).search}`;

export const ThirdPartyMessagesUrl = pathParamsFromUrl(
RegExp("^[/]+messages[/]+([^/]+)$"),
Expand Down Expand Up @@ -434,7 +434,7 @@ export const redirectAttachment =
.otherwise((au) =>
TE.left(
new Error(
`Can not find a Piattaforma Notifiche get attachment implementation for ${au}`
`Can not distinguish a PnDocumentUrl from a PnPaymentUrl with the url ${au}`
)
)
)
Expand Down Expand Up @@ -534,7 +534,7 @@ export const pnFetch =
pipe(
TE.left(
new Error(
`Can not find a Piattaforma Notifiche implementation for ${url}`
`[pnFetch] Can not find a Piattaforma Notifiche implementation for ${url}`
)
),
TE.mapLeft(errorResponse),
Expand Down

0 comments on commit 3313bb5

Please sign in to comment.