Skip to content
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 message returns JSON parse error in alert to user #221

Open
alexdryden opened this issue Sep 15, 2023 · 1 comment
Open

Error message returns JSON parse error in alert to user #221

alexdryden opened this issue Sep 15, 2023 · 1 comment

Comments

@alexdryden
Copy link
Contributor

When uploading a media item with a file extension that isn't allowed, a JSON parse error message is displayed instead of the the custom error text:
Screenshot 2023-09-15 at 11 48 16 AM

This is because the error message is not passed with the self keyword here:

throw new Exception(FILE_NAME_NOT_ALLOWED);

It should be throw new Exception(self::FILE_NAME_NOT_ALLOWED);. I can submit a pr for this along with the other error message related issue.

@craigdietrich
Copy link
Collaborator

A pull request here, too, would be excellent, thanks @alexdryden !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants