You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: throw and catch error when calls to cloudinary upload fails (#72)
# Description
<!-- Include a summary of the change made and also list the dependencies
that are required if any -->
Catch errors when using cloudinary uploader. Throw in the lib catch
during build and log them .
## Issue Ticket Number
Fixed#58

## Type of change
<!-- Please select all options that are applicable. -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
# Checklist
<!-- These must all be followed and checked. -->
- [X] I have followed the contributing guidelines of this project as
mentioned in [CONTRIBUTING.md](/CONTRIBUTING.md)
- [X] I have created an
[issue](https://github.com/colbyfayock/netlify-plugin-cloudinary/issues)
ticket for this PR
- [X] I have checked to ensure there aren't other open [Pull
Requests](https://github.com/colbyfayock/netlify-plugin-cloudinary/pulls)
for the same update/change?
- [X] I have performed a self-review of my own code
- [X] I have run tests locally to ensure they all pass
- [X] I have commented my code, particularly in hard-to-understand areas
- [X] I have made corresponding changes needed to the documentation
'Both your Cloudinary API Key and API Secret are required when using a Delivery Type of Upload. Please confirm the environment variables CLOUDINARY_API_KEY and CLOUDINARY_API_SECRET are configured.';
3
-
exportconstERROR_CLOUD_NAME_REQUIRED=
4
-
'A Cloudinary Cloud Name is required. Please set cloudName input or use the environment variable CLOUDINARY_CLOUD_NAME';
exportconstERROR_API_CREDENTIALS_REQUIRED='Both your Cloudinary API Key and API Secret are required when using a Delivery Type of Upload. Please confirm the environment variables CLOUDINARY_API_KEY and CLOUDINARY_API_SECRET are configured.';
3
+
exportconstERROR_CLOUD_NAME_REQUIRED='A Cloudinary Cloud Name is required. Please set cloudName input or use the environment variable CLOUDINARY_CLOUD_NAME';
5
4
exportconstERROR_INVALID_IMAGES_PATH='Invalid asset path. Please make sure your imagesPath is defined.';
6
-
exportconstERROR_NETLIFY_HOST_CLI_SUPPORT=
7
-
'Note: The Netlify CLI does not currently support the ability to determine the host locally, try deploying on Netlify.';
8
-
exportconstERROR_NETLIFY_HOST_UNKNOWN=
9
-
'Cannot determine Netlify host, can not proceed with plugin.';
10
-
exportconstERROR_SITE_NAME_REQUIRED='Cannot determine the site name, can not proceed with plugin';
5
+
exportconstERROR_NETLIFY_HOST_CLI_SUPPORT='Note: The Netlify CLI does not currently support the ability to determine the host locally, try deploying on Netlify.';
6
+
exportconstERROR_NETLIFY_HOST_UNKNOWN='Cannot determine Netlify host, can not proceed with plugin.';
7
+
exportconstERROR_SITE_NAME_REQUIRED='Cannot determine the site name, can not proceed with plugin';
8
+
exportconstERROR_UPLOAD_PRESET='To use a delivery type of "upload", please use an uploadPreset for unsigned requests or an API Key and Secret for signed requests'
9
+
exportconstERROR_INVALID_SRCSET='Invalid srcset path. Please make sure the srcset is defined.'
consttext=globalErrors.length>0 ? `The build process found ${globalErrors.length} errors. Check build logs for more information` : "No errors found during build"
0 commit comments