Skip to content

Question regarding AzureBlobStorage.WriteAsync error handling #102

@zvo-bla

Description

@zvo-bla

I am currently writing something that should upload data to blobs and save records of failed ones.

How does blobStorage.WriteAsync report errors?
Does it just pass through the Exceptions of the different storage provider SDKs?
Or is there a FluentStorage Exception type, that I can catch to make the code automatically work with all storage providers the same way?

Also I was looking through the code and saw this catch clause in the WriteAsync method of AzureBlobStorage:

catch (RequestFailedException ex) when (ex.ErrorCode == "OperationNotAllowedInCurrentState") {
	//happens when trying to write to a non-file object i.e. folder
}

Does that mean if I accidentally try to write data to a folder that it doesn't actually do it and FluentStorage still returns success?
That would seem kinda dangerous to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions