AtlasOfLivingAustralia/biocache-hubs

Record page silently fails when incorrect apikey is used

nickdos opened this issue · 1 comments

Viewing a record page with a logged-in user that has club role can result in an error page with no information.

The call to biocache-service fails with a 403 but the hubs code does not catch this and results in an empty JSON object with no explanation.

Tracked bug down to this commit that removed the check for the content code c8c6304.

Bug can be triggered by setting an invalid value for biocache.apiKey and clearing cache on /alaAdmin page. If you see an error page with empty values for exception message, then the bug is still unfixed. If you see an error page with 403 and an exception message, then bug is fixed.

Tested together with Nick, proper error information was displayed when hub pointed to auth prod (auth-test has a new implementation hence did not trigger 403)
Screen Shot 2022-02-17 at 11 43 46 am