cznethub / dsp

CZNet Hub Data Submission Portal
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Permission errors trigger authentication dialog #109

Closed Maurier closed 1 year ago

Maurier commented 1 year ago

Description of the bug User permission errors inside some repositories are returning error code 403 for users that have already authorized the repo (instead of 401), which we handle by displaying the authentication dialog. We need improve the handling of these errors to read more details and act accordingly.

Steps to reproduce the bug:

  1. Authorize the repository you wish to test.
  2. Try to register an external resource that will result in permission denied (.i.e: https://www.hydroshare.org/resource/e228eeaa2beb47558115d652770feaf0/)
  3. Notice that registration fails and authentication dialog is displayed.

Expected behavior Authentication dialog is not displayed, since the user has already authorized the repository. Instead, an error is shown indicating that the resource could not be loaded.

Additional information https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

Maurier commented 1 year ago

This has been fixed and will be included in our next release/deployment.