{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/whitehall/issues/2411","labels_url":"https://api.github.com/repos/alphagov/whitehall/issues/2411/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/whitehall/issues/2411/comments","events_url":"https://api.github.com/repos/alphagov/whitehall/issues/2411/events","html_url":"https://github.com/alphagov/whitehall/pull/2411","id":121453781,"number":2411,"title":"Validate the length of fields in Offsite Links","user":{"login":"jamiecobbett","id":93739,"avatar_url":"https://avatars.githubusercontent.com/u/93739?v=3","gravatar_id":"","url":"https://api.github.com/users/jamiecobbett","html_url":"https://github.com/jamiecobbett","followers_url":"https://api.github.com/users/jamiecobbett/followers","following_url":"https://api.github.com/users/jamiecobbett/following{/other_user}","gists_url":"https://api.github.com/users/jamiecobbett/gists{/gist_id}","starred_url":"https://api.github.com/users/jamiecobbett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamiecobbett/subscriptions","organizations_url":"https://api.github.com/users/jamiecobbett/orgs","repos_url":"https://api.github.com/users/jamiecobbett/repos","events_url":"https://api.github.com/users/jamiecobbett/events{/privacy}","received_events_url":"https://api.github.com/users/jamiecobbett/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-10T10:35:04Z","updated_at":"2015-12-11T09:44:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/alphagov/whitehall/pulls/2411","html_url":"https://github.com/alphagov/whitehall/pull/2411","diff_url":"https://github.com/alphagov/whitehall/pull/2411.diff","patch_url":"https://github.com/alphagov/whitehall/pull/2411.patch"},"body":"Rather than letting the database raise an error (now that we have a MySQL\r\nversion which doesn't silently truncate), let's validate it in the model and\r\nshow the user a helpful validation message, not a 5xx error page.\r\n\r\nExample of this happening in production: https://errbit.publishing.service.gov.uk/apps/53020d6c0da11585f10000e7/problems/5669211065786305bb340300\r\n\r\nHere are [the relevant lines from schema.rb](https://github.com/alphagov/whitehall/blob/master/db/schema.rb#L724-L728)"},"comment":{"url":"https://api.github.com/repos/alphagov/whitehall/issues/comments/163890638","html_url":"https://github.com/alphagov/whitehall/pull/2411#issuecomment-163890638","issue_url":"https://api.github.com/repos/alphagov/whitehall/issues/2411","id":163890638,"user":{"login":"benilovj","id":23801,"avatar_url":"https://avatars.githubusercontent.com/u/23801?v=3","gravatar_id":"","url":"https://api.github.com/users/benilovj","html_url":"https://github.com/benilovj","followers_url":"https://api.github.com/users/benilovj/followers","following_url":"https://api.github.com/users/benilovj/following{/other_user}","gists_url":"https://api.github.com/users/benilovj/gists{/gist_id}","starred_url":"https://api.github.com/users/benilovj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benilovj/subscriptions","organizations_url":"https://api.github.com/users/benilovj/orgs","repos_url":"https://api.github.com/users/benilovj/repos","events_url":"https://api.github.com/users/benilovj/events{/privacy}","received_events_url":"https://api.github.com/users/benilovj/received_events","type":"User","site_admin":false},"created_at":"2015-12-11T09:44:56Z","updated_at":"2015-12-11T09:44:56Z","body":"SDD (seal-driven development)"}}