fix: updated error message for attempting to deploy a site with a badโฆ
๐ Thanks for submitting a pull request! ๐
Summary
Fixes: 6736
Previously, netlify deploy with a valid site ID and an invalid auth token would log Error: Site not found. Please rerun "netlify link". Updated this error message to be more clear by logging the message property from the API response when the response status is 401.
Before:
After:
For us to review and ship your PR efficiently, please perform the following steps:
- [ ] Open a bug/issue before writing your code ๐งโ๐ป. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire ๐ฅ (e.g. incident related), you can skip this step.
- [ ] Read the contribution guidelines ๐. This ensures your code follows our style guide and passes our tests.
- [ ] Update or add tests (if any source code was changed or added) ๐งช
- [ ] Update or add documentation (if features were changed or added) ๐
- [ ] Make sure the status checks below are successful โ
A picture of a cute animal (not mandatory, but encouraged)
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?
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?
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 site not found in that case might be misleading. Let me know your thoughts :) @khendrikse