c-hive / dotdev

Next.js SPA professional website template for teams and individuals: https://c-hive.github.io/dotdev/
MIT License
0 stars 1 forks source link

Utilize SafeJsonResponse(). #132

Closed gomorizsolt closed 4 years ago

gomorizsolt commented 4 years ago

Issue #122.

gomorizsolt commented 4 years ago

Which UI glitch do you mean? 🙂

I mean the one that's detailed in #122.

Edit: I've updated the PR's description.

gomorizsolt commented 4 years ago

So there's a meaningful error message in place of the star icon if something goes wrong.

CleanShot 2020-05-19 at 09 21 54

gomorizsolt commented 4 years ago

This still raises so I don't get how it resolves the issue. Let's talk about it but feel free to merge.

I don't get this. How could you reproduce the issue?

gomorizsolt commented 4 years ago

To clarify: without safeJsonResponse(), the response coming from the GitHub API is still valid even if there's an error since it can be parsed to JSON.

{message: "Not Found", documentation_url: "https://developer.github.com/v3/repos/#get"}

That's the reason why we could see the "star" icon without any context (i.e. without title, description and tech icons).

gomorizsolt commented 4 years ago

(and also partially affects #128)

I don't recall this anymore, sorry. I'll take a look into it to what extent safeJsonResponse() fixes the error described there.

thisismydesign commented 4 years ago

So there's a meaningful error message in place of the star icon if something goes wrong.

Please don't display anything in this case.

This still raises so I don't get how it resolves the issue. Let's talk about it but feel free to merge.

I don't get this. How could you reproduce the issue?

To clarify: without safeJsonResponse(), the response coming from the GitHub API is still valid even if there's an error since it can be parsed to JSON.

I meant in the code but this makes sense then, nevermind.