Do not catch StringLengthValidation errors AND email validation errors.
Summary
When Activity manager add and update functions throw out StringValidator and Email Verification errors, they're caught and logged at the newsfeed POST endpoint.
E.g. https://sentry.io/organizations/minds-inc/issues/2520826688/?project=1538020&query=is%3Aunresolved
This eats into logs and they should just be errors returned back to the user for consumption.
Steps to reproduce
Trigger a string length validation error, enter a large post above bounds and see output error is not a StringLengthValidation exception. Look in controller - it is being logged.
Platform information
Engine
What is the current bug behavior?
Unneccesary logs
What is the expected correct behavior?
Should not log but should still return error to user - need to check errors are still displayed correctly on web or mob.
Relevant logs and/or screenshots
\Sentry\captureException($e);
return Factory::response([
'status' => 'error',
'message' => $e->getMessage()
]);
Possible fixes
We should still log exceptions, so should probably add explicit catch blocks for the exceptions we want to catch and handle differently.