-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix: updated error message for attempting to deploy a site with a bad… #6884
Conversation
… auth key Co-authored-by: Ben Hancock <benhancock859@gmail.com>
Hi @dylanspyer! Thank you so much for your contribution :) could you maybe still log 'site not found' but also render the error message? I think this could inform our users better on what part of the process went wrong and why? |
… precise Co-authored-by: Ben Hancock <benhancock859@gmail.com>
Thanks for the feedback! I pushed an update with a clearer error message: In this failure case, it's possible that the site id is valid and the auth token is invalid. Logging |
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.
This looks good to me! Just have a request to remove those type errors.
Co-authored-by: Ben Hancock <benhancock859@gmail.com>
🎉 Thanks for submitting a pull request! 🎉
Summary
Fixes: 6736
Previously,
netlify deploy
with a valid site ID and an invalid auth token would logError: Site not found. Please rerun "netlify link"
. Updated this error message to be more clear by logging themessage
property from the API response when the response status is 401.Before:
![image](https://private-user-images.githubusercontent.com/115838205/377631041-10cbb67e-2f65-4a0f-921d-a75d9457c46c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5OTM0ODMsIm5iZiI6MTczOTk5MzE4MywicGF0aCI6Ii8xMTU4MzgyMDUvMzc3NjMxMDQxLTEwY2JiNjdlLTJmNjUtNGEwZi05MjFkLWE3NWQ5NDU3YzQ2Yy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxOVQxOTI2MjNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jZDI2NTI3MTgyNWE4MGM0MDYzNDhlN2Q4OGU4YjJiY2FmYTk3Nzg2ZTgzNmI2YWY4YWRmODA1ZmRhZGYzNDBjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Xud0dZPJXZSJgAzFEDQKMRnec4xJ-T9BKj7ibdwIGTM)
After:
![image](https://private-user-images.githubusercontent.com/115838205/377631318-d60fe750-9121-4176-aa7a-862837be2194.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5OTM0ODMsIm5iZiI6MTczOTk5MzE4MywicGF0aCI6Ii8xMTU4MzgyMDUvMzc3NjMxMzE4LWQ2MGZlNzUwLTkxMjEtNDE3Ni1hYTdhLTg2MjgzN2JlMjE5NC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxOVQxOTI2MjNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03YWNlNDA1ZmQ1Y2ZjNDk5NmUwZWUwMzhiODY3YjU3NDU2Mzk2OWY0OTgzNTdmNjU2YTk5YmM3MjAxMDQ4N2YxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.RalpeFqQ5S2oHmVnc4tS33b-s6CwoHuv7HFcdbckIz8)
For us to review and ship your PR efficiently, please perform the following steps:
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)
![image](https://private-user-images.githubusercontent.com/115838205/377631716-60e19ae5-e875-4971-aa17-3e33558d8ffe.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5OTM0ODMsIm5iZiI6MTczOTk5MzE4MywicGF0aCI6Ii8xMTU4MzgyMDUvMzc3NjMxNzE2LTYwZTE5YWU1LWU4NzUtNDk3MS1hYTE3LTNlMzM1NThkOGZmZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxOVQxOTI2MjNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kNzQ2Mjg2YzAzODRmODBiN2Y1ODAzYTI3Mzg5YzY5MzEwYzcxNzQ5YTRmZTIyZjMyZjIzNjE1ZDBiYTdlYjI0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.O-g7M734e3sNKRfu0b2piiDvMTUweq8Bzm3VTv_KoXI)