Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validation of new storage disks #4

Open
mzur opened this issue Jun 28, 2023 · 2 comments
Open

Add validation of new storage disks #4

mzur opened this issue Jun 28, 2023 · 2 comments

Comments

@mzur
Copy link
Member

mzur commented Jun 28, 2023

We had an error Unable to list contents for an S3 disk. Maybe there was a typo in the URL. We should add a validation with a "list contents" call to check if any files can be listed with a new storage disk. If not, throw a vaildation error.

@mzur mzur moved this to Medium Priority in BIIGLE Roadmap Jun 28, 2023
@mzur
Copy link
Member Author

mzur commented Jun 28, 2023

The validation could be done with the created user disk here:

and here:

If the validation failed, the changes should be reverted.

The validation can probably only be done after the disk is created because it needs an ID to create the "temporary storage disk", so the validation cannot be done in the form request classes.

@mzur
Copy link
Member Author

mzur commented Sep 7, 2023

There was this error with an incorrectly entered endpoint URL (missing the bucket name):

"message" => """
    Unable to list contents for '', shallow listing
Reason: Error executing "ListObjectsV2" on "https://s3.us-east-005.backblazeb2.com/?list-type=2&prefix=&delimiter=%2F"; AWS HTTP error: Client error: `GET https ▶
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Error>
        <Code>AccessDenied</Code>
        <Message>not entitled< (truncated...)
     AccessDenied (client): not entitled - <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Error>
        <Code>AccessDenied</Code>
        <Message>not entitled</Message>
    </Error>
    """
  "context" => array:2 [▼
    "userId" => xxx
    "exception" => array:6 [▶]
  ]
  "level" => 400
  "level_name" => "ERROR"
  "channel" => "production"
  "datetime" => "2023-09-06T19:26:08.359622+02:00"
  "extra" => []

Errors like these should produce a meaningful error message to the user, too (e.g. "access denied" in this case).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Medium Priority
Development

No branches or pull requests

1 participant