NEAR-Edu / near-certification-tools

2 stars 2 forks source link

Respond with 404 status error code (and a reasonable page explaining that nothing was found at this URL) for invalid token ID #32

Closed ryancwalsh closed 2 years ago

ryancwalsh commented 2 years ago

Finish https://github.com/NEAR-Edu/near-certification-tools/issues/31 (which is related) first before starting this issue.

Currently https://near-certification-tools-tpq1.onrender.com/certificate/xxxxxx responds with a page with a 200 status (successful) and shows:

image

Instead, the response's status code should be 404 (if that token ID can't be found), and the page should say so.

ryancwalsh commented 2 years ago

As we talked about on the T3 call just now, @hiba-machfej will help out with this one, and it will almost definitely involve some inefficiency (double-fetching data from on-chain) for now since we'll cancel #31 .