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

Improve error handling on image params #463

Merged
merged 1 commit into from
Jul 5, 2021

Conversation

mattwire
Copy link
Collaborator

Cleaner handling of method/params parameters for image processing endpoint. If parameters are invalid log an error and return bad request.

Before it was inconsistent and there seems little point throwing an exception or fatal error because the endpoint is generally used over AJAX.

@seamuslee001

@seamuslee001
Copy link
Contributor

So if this regex doesn't get matched https://github.com/veda-consulting-company/uk.co.vedaconsulting.mosaico/blob/2.x/CRM/Mosaico/ImageFilter.php#L37 it would still be used on the final image usage which wouldn't be over AJAX but I think that this is probably sensible none the less, however I would also think that you may want to adjust the other 2 Exceptions in this function as well?

@mattwire mattwire merged commit 2502a31 into veda-consulting-company:2.x Jul 5, 2021
@mattwire mattwire deleted the paramsval branch July 5, 2021 17:55
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

Successfully merging this pull request may close these issues.

2 participants