-
Notifications
You must be signed in to change notification settings - Fork 0
Errors from server properly displayed in ErrorState Component. #125
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
Conversation
✅ Deploy Preview for smart-cv-migracode ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
inkpot-monkey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm careful about this, I don't think it will work. Just make sure you double check and if it doesnt work then we have a solution we can implement :)
| import React, { useState } from 'react'; | ||
| import styles from './ApiKeyInput.module.css'; | ||
| import validateApiKey from '../../utils/validation.js'; | ||
| import validateApiKey from '../../../netlify/utils/validations.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested to make sure this works? I think it will break because you are trying to import from outside the src folder.
A better way is to symlink netlify's validation utils to the frontend. I have left a more indepth explanation of what I mean by that in this PR :) #124
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the symlink we need to remove one of these directory traversals
ie
import validateApiKey from '../../netlify/utils/validations.js';|
Is this ready for review @Priscilla-MacGatus ? |
…or debugging purposes
inkpot-monkey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM nice work lets merge it
Updated the app to properly catch and handle server-side errors by passing them to the ErrorState component. This ensures that when the server returns an error ), the user sees a meaningful and user-friendly error message instead of a generic failure or empty state.