-
Notifications
You must be signed in to change notification settings - Fork 138
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
Error handling when the folder type is not dynamic folder #398
Conversation
main.py
Outdated
cloudinary.config( | ||
cloud_name = "dfxefh712", | ||
api_key = "936813184334185", | ||
api_secret = "w6SdsGJqrm34jlKZuzvKQqHES4o", # Click 'View API Keys' above to copy your API secret |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@someshfengde please remove your secret from this file, since everyone can see it and it is already compromised.
You can disable existing and generate a new one here:
https://console.cloudinary.com/settings/api-keys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry removed the main.py file and disabled the secret
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for informing
|
||
try: | ||
result = json.loads(body.decode('utf-8')) | ||
except Exception as e: | ||
# Error is parsing json | ||
raise GeneralError("Error parsing server response (%d) - %s. Got - %s" % (response.status, body, e)) | ||
raise GeneralError("API is only supported on dynamic folders please check your folder mode on https://console.cloudinary.com/pm/developer-dashboard Error:%s " % str(e)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There can be different reasons to get a general error, not related to dynamic folders, this message will be misleading in all other use cases. We will open an issue for our backend team, the correct error should come back from our servers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohh got it. Should I make any changes or wait?
thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@someshfengde you can close this PR, since it's not related to the SDK.
@tommyg-cld will pass the issue to the backend team.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks,
got it :)
Brief Summary of Changes
added exception for directing user to dashboard to check the folder type in case error
What does this PR address?
Are tests included?
Reviewer, please note:
Checklist: