{"action":"created","issue":{"url":"https://api.github.com/repos/plank/laravel-mediable/issues/44","repository_url":"https://api.github.com/repos/plank/laravel-mediable","labels_url":"https://api.github.com/repos/plank/laravel-mediable/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/plank/laravel-mediable/issues/44/comments","events_url":"https://api.github.com/repos/plank/laravel-mediable/issues/44/events","html_url":"https://github.com/plank/laravel-mediable/pull/44","id":188912774,"number":44,"title":"Return more granular HTTP status codes for MediaUploadException","user":{"login":"sebdesign","id":667144,"avatar_url":"https://avatars.githubusercontent.com/u/667144?v=3","gravatar_id":"","url":"https://api.github.com/users/sebdesign","html_url":"https://github.com/sebdesign","followers_url":"https://api.github.com/users/sebdesign/followers","following_url":"https://api.github.com/users/sebdesign/following{/other_user}","gists_url":"https://api.github.com/users/sebdesign/gists{/gist_id}","starred_url":"https://api.github.com/users/sebdesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebdesign/subscriptions","organizations_url":"https://api.github.com/users/sebdesign/orgs","repos_url":"https://api.github.com/users/sebdesign/repos","events_url":"https://api.github.com/users/sebdesign/events{/privacy}","received_events_url":"https://api.github.com/users/sebdesign/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-11-12T13:53:52Z","updated_at":"2016-11-14T21:48:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/plank/laravel-mediable/pulls/44","html_url":"https://github.com/plank/laravel-mediable/pull/44","diff_url":"https://github.com/plank/laravel-mediable/pull/44.diff","patch_url":"https://github.com/plank/laravel-mediable/pull/44.patch"},"body":"Introduce a `HandlesMediaExceptions` trait which can be used in the\r\n`Exception\\Handler` to return more granular HTTP status codes when a\r\n`MediaUploadException` is thrown.\r\n\r\nI have updated the docs, (spotted a few typos also), but I couldn't get Sphinx to work.\r\n\r\nThis can be extended to handle more exceptions like `MediaMoveException` or `MediaUrlException` in the future.\r\n\r\nAlso it would be interesting if we could throw `Illuminate\\Validation\\ValidationException`s instead of `HttpException`s in some cases, for better upload validation handling."},"comment":{"url":"https://api.github.com/repos/plank/laravel-mediable/issues/comments/260473420","html_url":"https://github.com/plank/laravel-mediable/pull/44#issuecomment-260473420","issue_url":"https://api.github.com/repos/plank/laravel-mediable/issues/44","id":260473420,"user":{"login":"frasmage","id":916652,"avatar_url":"https://avatars.githubusercontent.com/u/916652?v=3","gravatar_id":"","url":"https://api.github.com/users/frasmage","html_url":"https://github.com/frasmage","followers_url":"https://api.github.com/users/frasmage/followers","following_url":"https://api.github.com/users/frasmage/following{/other_user}","gists_url":"https://api.github.com/users/frasmage/gists{/gist_id}","starred_url":"https://api.github.com/users/frasmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frasmage/subscriptions","organizations_url":"https://api.github.com/users/frasmage/orgs","repos_url":"https://api.github.com/users/frasmage/repos","events_url":"https://api.github.com/users/frasmage/events{/privacy}","received_events_url":"https://api.github.com/users/frasmage/received_events","type":"User","site_admin":false},"created_at":"2016-11-14T21:48:01Z","updated_at":"2016-11-14T21:48:01Z","body":"Interesting. I like the fine grained control that would provide, allowing controllers to behave differently. I'm a little worried that `transformToHttpException()` is a bit too generic a name, maybe `transformMediaUploadException()`?\r\n\r\nI'll give your PR a final look over tomorrow."}}
{"actor":{"display_login":"frasmage"}}