CDLUC3 / dmsp_frontend_prototype

Repo to test out new NextJS framework
MIT License
0 stars 0 forks source link

Create some basic error handling middleware for 404 or 500 errors #29

Closed jupiter007 closed 1 month ago

jupiter007 commented 2 months ago

GraphQL Errors Since we are creating a web application that makes calls to the GraphQL Server API, we should make sure to build in some error handling for the graphql requests.

404 errors: This can be handled by creating a not-found.tsx file.

Add "app/error.tsx" to handle server-side error error pages. Client-side components can display the errors returned to the component in the page itself.

As part of our error handling, we should be logging our errors, and our logs should comply with the Elastic Common Schema (ECS) possibly using ecs-logging-nodejs.

jupiter007 commented 1 month ago

I'm going to go ahead and merge my changes since I've gone over my changes with the team already.

jupiter007 commented 1 month ago

The changes have been tested and merged.