{"action":"closed","issue":{"url":"https://api.github.com/repos/scrapinghub/scrapyrt/issues/22","labels_url":"https://api.github.com/repos/scrapinghub/scrapyrt/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/scrapinghub/scrapyrt/issues/22/comments","events_url":"https://api.github.com/repos/scrapinghub/scrapyrt/issues/22/events","html_url":"https://github.com/scrapinghub/scrapyrt/issues/22","id":101420255,"number":22,"title":"Return custom HTTP code from spider","user":{"login":"busla","id":3162968,"avatar_url":"https://avatars.githubusercontent.com/u/3162968?v=3","gravatar_id":"","url":"https://api.github.com/users/busla","html_url":"https://github.com/busla","followers_url":"https://api.github.com/users/busla/followers","following_url":"https://api.github.com/users/busla/following{/other_user}","gists_url":"https://api.github.com/users/busla/gists{/gist_id}","starred_url":"https://api.github.com/users/busla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/busla/subscriptions","organizations_url":"https://api.github.com/users/busla/orgs","repos_url":"https://api.github.com/users/busla/repos","events_url":"https://api.github.com/users/busla/events{/privacy}","received_events_url":"https://api.github.com/users/busla/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-17T13:24:56Z","updated_at":"2015-08-19T20:34:04Z","closed_at":"2015-08-19T20:34:04Z","body":"Is there any way I can return back to scrapyrt from my spider with a custom HTTP code and message?\r\n\r\nLet´s say I´m trying to login but have the wrong user and password. I check for the error text in xpath and return a HTTP 401 with a custom message.\r\n\r\nThanks for a lovely library.\r\n\r\nCheers"}}