Add validation for response body && api key check #681
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses a critical issue with the GitHub contributions widget, which was found to be malfunctioning. The initial diagnosis led to the setup of a local development environment, during which it was discovered that the Unsplash API key was not configured. This oversight resulted in an unexpected response from the fetch request, subsequently triggering an error during the data mapping process due to the response body being of an unanticipated format.
The underlying issue has been identified as a missing Unsplash API key which, when not set, leads to a chain of uncaught exceptions culminating in an obscure error message. The necessary error handling has been implemented to ensure that such cases are handled gracefully in the future, prompting the developer to set the API key.
Additionally, this PR serves as an inquiry into the current status and future plans for the GitHub contribution calendar widget. We have noticed potential discrepancies in the API response from https://api.bloggify.net/gh-calendar/?username=7empestx, which might indicate changes in the API endpoint behavior or output. Clarification on this would be beneficial for further troubleshooting and subsequent rectification of the widget functionality.
Attached below is a visual representation of the widget issue for reference: