pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/firstcontributions/frontend/pull/51

/> Feature/error handling and reporting by Tgodmuna · Pull Request #51 · firstcontributions/frontend · GitHub
Skip to content

Comments

Feature/error handling and reporting#51

Open
Tgodmuna wants to merge 4 commits intofirstcontributions:mainfrom
Tgodmuna:feature/error-handling-and-reporting
Open

Feature/error handling and reporting#51
Tgodmuna wants to merge 4 commits intofirstcontributions:mainfrom
Tgodmuna:feature/error-handling-and-reporting

Conversation

@Tgodmuna
Copy link

@Tgodmuna Tgodmuna commented May 5, 2023

Add specific error handling and Sentry reporting logic

This commit updates the CustomErrorComponent in pages/_error.js to include additional error handling logic based on the error type or status code. It also captures errors with Sentry for improved error reporting.

Specific changes include:

  • Added handling for 404 errors with custom message
  • Added try-catch block to getInitialProps to catch and report errors with Sentry
  • Updated comments for clarity

Note: This implementation assumes the use of @sentry/nextjs version 7.3.0 or higher.

This commit updates the `CustomErrorComponent` in `pages/_error.js` to include additional error handling logic based on the error type or status code. It also captures errors with Sentry for improved error reporting.

Specific changes include:
- Added handling for 404 errors with custom message
- Added try-catch block to `getInitialProps` to catch and report errors with Sentry
- Updated comments for clarity

Note: This implementation assumes the use of `@sentry/nextjs` version 7.3.0 or higher.
Refactor UserDetails component for better readability and maintainability

Destructured user prop in function argument
Used nullish coalescing operator for avatar and handle props
Moved useFragment query to its own constant and reformatted for better readability
Renamed Props type to UserDetailsProps
Extracted GitStats component from UserDetails
Added aria-label to icon elements for accessibility
Reformatted code for consistent indentation and spacing
@Roshanjossey Roshanjossey force-pushed the main branch 7 times, most recently from 0480d00 to 7e75899 Compare August 19, 2023 17:52
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.

1 participant

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy