mirror of https://github.com/pixelfed/pixelfed
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
publishNext() throws ValidationException::withMessages() for invalid story overlays (bad text/hashtag/mention/url/type), but the enclosing catch (\Exception $e) caught it too, since ValidationException extends Exception. Clients got a generic 500 "Failed to create story" instead of the intended 422 with field-level errors, and the log was flooded with ordinary user-input validation failures logged as server errors. Catch ValidationException separately, roll back, and rethrow it so Laravel's exception handler renders the normal 422 response. |
2 weeks ago | |
|---|---|---|
| .. | ||
| StoryApiV1Controller.php | 2 weeks ago | |