developerFolio
developerFolio copied to clipboard
throw new Error(ERR.requestMediumFailed)
Describe the bug
there is a bug if it won't find medium user or getting forbidden then it will throw an error
statusCode: 403 /home/runner/work/portfolio/portfolio/fetch.js:111 throw new Error(ERR.requestMediumFailed); ^
Error
at ClientRequest.
Steps to reproduce
- change the medium username to some other unknown user (not present on medium)
Expected behavior
It should throw a message through exception.
Is this responsiveness Issue
NO
Screenshots
No response
Desktop
- OS: [Any]
- Browser: [Any]
- Version: [Any]
Smartphones
- Device: [Any]
- OS: [Any]
- Browser [Any]
- Version [Any]
Additional context
You have
const ERR = { noUserName: "Github Username was found to be undefined. Please set all relevant environment variables.", requestFailed: "The request to GitHub didn't succeed. Check if GitHub token in your .env file is correct.", requestFailedMedium: "The request to Medium didn't succeed. Check if Medium username in your .env file is correct." };
It can be fixed by replacing requestMediumFailed
/home/runner/work/portfolio/portfolio/fetch.js:111 throw new Error(ERR.requestMediumFailed);
with throw new Error(ERR.requestFailedMedium);