strapi-provider-upload-azure-storage icon indicating copy to clipboard operation
strapi-provider-upload-azure-storage copied to clipboard

Return a more useful error when authType is omitted

Open MatthewWilkes opened this issue 1 year ago • 1 comments

The new authType parameter is necessary to distinguish between the two Config types, with makeBlobServiceClient having different paths through a switch depending on its value to narrow the type between the two possible values. When upgrading from 3.3.0 this value won't be set, so users must explicitly set it to 'default' to maintain the current behaviour, however the default handler throws an error with the config object, which results in the user-facing error [2024-02-06 17:36:10.217] error: [object Object].

This change replaces throwing the config with throwing a human-readable string explaining the issue.

MatthewWilkes avatar Feb 06 '24 17:02 MatthewWilkes

Thanks for 3.4.0, by the way :)

MatthewWilkes avatar Feb 06 '24 18:02 MatthewWilkes