jakeFeldman / strapi-provider-upload-azure-storage

Strapi Provider Upload Azure Storage
MIT License
75 stars 42 forks source link

Return a more useful error when authType is omitted #85

Open MatthewWilkes opened 8 months ago

MatthewWilkes commented 8 months ago

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 commented 8 months ago

Thanks for 3.4.0, by the way :)