You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.
It could be the case, that the API volume of Google Books is exhausted. The response will return a 403 status code.
I updated the backend and return this status to the client (0d65914).
What we need now is to display a message in the frontend. The best thing we can do is create a new variable, and set it to true if the response is a 403. And show a proper message in the template, similiar to the Nothing found :( span.
To test this, you can replace the line 24 in express.js instead of res.json(formattedData) with res.json(forbiddenResponse()).
Bonus point: Move the hardcodet status codes (404 for example) to own constants on top of the script (:
The text was updated successfully, but these errors were encountered:
It could be the case, that the API volume of Google Books is exhausted. The response will return a 403 status code.
I updated the backend and return this status to the client (0d65914).
What we need now is to display a message in the frontend. The best thing we can do is create a new variable, and set it to
true
if the response is a 403. And show a proper message in the template, similiar to theNothing found :(
span.To test this, you can replace the line 24 in express.js instead of
res.json(formattedData)
withres.json(forbiddenResponse())
.Bonus point: Move the hardcodet status codes (
404
for example) to own constants on top of the script (:The text was updated successfully, but these errors were encountered: