Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #97

Merged
merged 5 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/deployment_development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
steps:
# Checkout branch
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# Enforce node version
- uses: actions/setup-node@v4
with:
node-version: 20.17.0
node-version: 20

# Versioning
- name: Perform Versioning
Expand All @@ -43,12 +43,12 @@ jobs:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# Enforce node version
- uses: actions/setup-node@v4
with:
node-version: 20.17.0
node-version: 20

# Create the first message on slack
- name: Update status on slack
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deployment_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
steps:
# Checkout branch
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# Enforce node version
- uses: actions/setup-node@v4
with:
node-version: 20.17.0
node-version: 20

# Versioning
- name: Perform Versioning
Expand All @@ -43,12 +43,12 @@ jobs:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# Enforce node version
- uses: actions/setup-node@v4
with:
node-version: 20.17.0
node-version: 20

# Create the first message on slack
- name: Update status on slack
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-alpine as builder
FROM node:20-alpine as builder

WORKDIR /usr/src/app
COPY package.json tsconfig.json package-lock.json .npmrc nest-cli.json tsconfig.build.json ./
Expand Down
8 changes: 7 additions & 1 deletion src/modules/apm/sentry.exception.filter.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
import { ArgumentsHost, Catch, HttpServer } from '@nestjs/common';
import { AbstractHttpAdapter, BaseExceptionFilter } from '@nestjs/core';
import * as Sentry from '@sentry/node';
import { ExtendedLogger } from '../../utils/ExtendedLogger';

@Catch()
export class SentryFilter extends BaseExceptionFilter {
readonly logger = new ExtendedLogger('SentryFilter');
handleUnknownError(
exception: any,
host: ArgumentsHost,
applicationRef: HttpServer<any, any> | AbstractHttpAdapter<any, any, any>,
): void {
this.logger.debug(`In SentryFilter`);
this.logger.debug(`sending exception to sentry`, JSON.stringify(exception));
Sentry.captureException(exception);

if ((host as any).contextType && (host as any).contextType === 'graphql') {
//do nothing as we want to see the GQL errors in the manager
this.logger.debug(`doing nothing so we see the errors passed along to the gql request`);
} else {
//do the normal error stuff, so that we return the http error codes if it was a http request
super.handleUnknownError(exception, host, applicationRef);
this.logger.debug(`calling super`);
return super.handleUnknownError(exception, host, applicationRef);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ export class BulkOperationFinishedWebhookHandler extends ShopifyWebhookHandler<u
this.logger.log('bulkOpComplete webhook referenced unknown bulkOp');
return;
} else {
this.logger.debug(`Loaded bulkop from database`, bulkOp);
this.logger.debug(`Loaded bulkop from database`, JSON.stringify(bulkOp));
}

const retailer = await this.retailerService.getByDomain(domain);
if (!retailer) {
this.logger.debug('Cannot get retailer for domain ' + domain);
return;
} else {
this.logger.debug(`Loaded retailer from database`, retailer);
this.logger.debug(`Loaded retailer from database`, JSON.stringify(retailer));
}

bulkOp = await this.bulkOperationService.updateFromShopify(retailer, bulkOp);
Expand Down