Skip to content

Commit

Permalink
Merge branch 'master' of github.com:pagopa/io-functions-admin
Browse files Browse the repository at this point in the history
  • Loading branch information
balanza committed Oct 27, 2020
2 parents 84d0430 + 5cb2aa1 commit 681b833
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions UpdateUser/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { ContextMiddleware } from "io-functions-commons/dist/src/utils/middlewar
import { RequiredBodyPayloadMiddleware } from "io-functions-commons/dist/src/utils/middlewares/required_body_payload";
import { RequiredParamMiddleware } from "io-functions-commons/dist/src/utils/middlewares/required_param";
import { withRequestMiddlewares } from "io-functions-commons/dist/src/utils/request_middleware";
import { readableReport } from "italia-ts-commons/lib/reporters";
import { wrapRequestHandler } from "italia-ts-commons/lib/request_middleware";
import {
IResponseErrorInternal,
Expand Down Expand Up @@ -77,7 +78,10 @@ const updateUser = (
id: updateUserResponse.objectId,
last_name: userPayload.last_name,
token_name: userPayload.token_name
}).mapLeft(toError)
}).mapLeft(
errs =>
new Error(`Error decoding UserUpdated ERROR=${readableReport(errs)}`)
)
)
);

Expand All @@ -89,7 +93,7 @@ export function UpdateUserHandler(
const internalErrorHandler = (errorMessage: string, error: Error) =>
genericInternalErrorHandler(
context,
"UpdateUser | " + errorMessage,
"UpdateUser| " + errorMessage,
error,
errorMessage
);
Expand All @@ -111,7 +115,7 @@ export function UpdateUserHandler(
.mapLeft(error =>
internalErrorHandler(
"Could not update the user on the ADB2C",
error
new Error(JSON.stringify(error))
)
)
)
Expand Down
2 changes: 1 addition & 1 deletion azure-templates/deploy-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
parameters:
- name: 'deployType'
type: string
default: deployToProductionSlot
default: deployToStagingSlot
values:
- deployToProductionSlot
- deployToStagingSlotAndSwap
Expand Down

0 comments on commit 681b833

Please sign in to comment.