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

Server crash fixes #123

Merged
merged 2 commits into from
Feb 20, 2024
Merged

Server crash fixes #123

merged 2 commits into from
Feb 20, 2024

Conversation

wtfsayo
Copy link
Contributor

@wtfsayo wtfsayo commented Feb 20, 2024

No description provided.

Copy link
Contributor

@plor plor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly nitpicks, main question is if there is a way to catch Errors anywhere in the app and fallback to 500. Just worried that an error will slip through and crash in the future.

@@ -21,7 +21,7 @@ RUN adduser --system --uid 1001 nextjs


# Copy the bundled code from the build stage to the production image
COPY --from=build --chown=nextjs:nodejs /app/.next/standalone ./
# COPY --from=build --chown=nextjs:nodejs /app/.next/standalone ./
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of commenting out code, if it isn't needed it should just be removed.

@@ -5,15 +5,11 @@ import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
const { httpAdapter } = app.get(HttpAdapterHost);
app.useGlobalFilters(new PrismaClientExceptionFilter(httpAdapter));
// app.useGlobalFilters(new PrismaClientExceptionFilter(httpAdapter));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another instance of commenting out code, not a fan.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

understood ser, both are todo figure later!

@wtfsayo wtfsayo merged commit 97731d0 into develop Feb 20, 2024
@wtfsayo wtfsayo deleted the server-crash-fix branch February 20, 2024 02:41
@plor plor linked an issue Feb 21, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent backend from crashing
2 participants