Conversation
| res.status(result.statusCode).header(result.headers).send(result.body); | ||
|
|
||
| logger.info('Responded to request "POST /"', result); | ||
| logger.debug('Responded to request "POST /"', result); |
There was a problem hiding this comment.
This was too spammy. Note, that I still left the receive log as INFO level.
|
|
||
| Utilities commonly used by other packages. Each common utility lives in its own folder together with its documentation. | ||
| The implementation is re-exported by main entry of this package. The package consists of: | ||
| > Utilities commonly used by other packages. |
There was a problem hiding this comment.
To make it consistent with other packages.
| debug: (message, context) => logger.debug(message, { context }), | ||
| info: (message, context) => logger.info(message, { context }), | ||
| warn: (message, context) => logger.warn(message, { context }), | ||
| debug: (message, context) => logger.debug(message, context ? { context } : undefined), |
There was a problem hiding this comment.
If you do not pass context, the logs previously had {context: undefined} which is unnecessary (and confusing).
| ## Getting started | ||
|
|
||
| 1. If you are using Docker Desktop, you need to change the URL in `pusher/secrets.env` from `localhost` to | ||
| `host.docker.internal`, because pusher is running inside a Docker container. |
There was a problem hiding this comment.
Since the configurations are not gitignored it will modify source tree, but I don't think we need to care much.
| # Secrets must NOT be quoted. | ||
| # | ||
| # Use "host.docker.internal" if using Docker for Desktop. | ||
| HOST_IP=localhost |
There was a problem hiding this comment.
Interpolated in config to make it easier to work with.
| logger.debug('Preprocessing API call payload', pick(payload.aggregatedApiCall, ['endpointName', 'oisTitle'])); | ||
| const processedPayload = await preProcessApiSpecifications(payload); | ||
| logger.debug('Performing API call', { processedPayload: processedPayload }); | ||
| logger.debug('Performing API call', pick(processedPayload.aggregatedApiCall, ['endpointName', 'oisTitle'])); |
| if (node.api.isPerformApiCallFailure(apiCallResponse)) { | ||
| const message = `Failed to make API call for the endpoint [${endpoint.oisTitle}] ${endpoint.endpointName}.`; | ||
| logger.warn(message, { operationTemplateId }); | ||
| logger.warn(`Failed to make API call`, { |
There was a problem hiding this comment.
Was missing error message.
| `Failed to make update signed API request.`, | ||
| // See: https://axios-http.com/docs/handling_errors | ||
| { ...logContext, error: goAxiosRequest.error.response ?? goAxiosRequest.error } | ||
| { |
There was a problem hiding this comment.
Was too spammy and also didn't have proper error message in certain network failures.
12919eb to
59cb592
Compare
Closes #52