{"action":"created","issue":{"url":"https://api.github.com/repos/whosgonna/Zabbix-Tiny.pm/issues/17","repository_url":"https://api.github.com/repos/whosgonna/Zabbix-Tiny.pm","labels_url":"https://api.github.com/repos/whosgonna/Zabbix-Tiny.pm/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/whosgonna/Zabbix-Tiny.pm/issues/17/comments","events_url":"https://api.github.com/repos/whosgonna/Zabbix-Tiny.pm/issues/17/events","html_url":"https://github.com/whosgonna/Zabbix-Tiny.pm/issues/17","id":176263768,"number":17,"title":"empty response from the API not handled properly","user":{"login":"richlv","id":112888,"avatar_url":"https://avatars.githubusercontent.com/u/112888?v=3","gravatar_id":"","url":"https://api.github.com/users/richlv","html_url":"https://github.com/richlv","followers_url":"https://api.github.com/users/richlv/followers","following_url":"https://api.github.com/users/richlv/following{/other_user}","gists_url":"https://api.github.com/users/richlv/gists{/gist_id}","starred_url":"https://api.github.com/users/richlv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richlv/subscriptions","organizations_url":"https://api.github.com/users/richlv/orgs","repos_url":"https://api.github.com/users/richlv/repos","events_url":"https://api.github.com/users/richlv/events{/privacy}","received_events_url":"https://api.github.com/users/richlv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-11T20:38:27Z","updated_at":"2016-09-13T17:51:40Z","closed_at":null,"body":"in some cases zabbix api returns a completely empty string, not even a json object. zabbix::tiny doesn't handle that properly :\r\n\r\nmalformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before \"(end of string)\") at /usr/lib/perl5/site_perl/5.18.2/Zabbix/Tiny.pm line 136.\r\n\r\nline 136 is :\r\n\r\n`$self->{last_response} = decode_json( $self->{post_response}->{_content} );`\r\nif i `print Dumper($self->{post_response}->{_content});` before that, it is empty :\r\n`$VAR1 = '';`\r\n\r\nin this specific case, zabbix api run out of memory when handling an event.get method request"},"comment":{"url":"https://api.github.com/repos/whosgonna/Zabbix-Tiny.pm/issues/comments/246765596","html_url":"https://github.com/whosgonna/Zabbix-Tiny.pm/issues/17#issuecomment-246765596","issue_url":"https://api.github.com/repos/whosgonna/Zabbix-Tiny.pm/issues/17","id":246765596,"user":{"login":"richlv","id":112888,"avatar_url":"https://avatars.githubusercontent.com/u/112888?v=3","gravatar_id":"","url":"https://api.github.com/users/richlv","html_url":"https://github.com/richlv","followers_url":"https://api.github.com/users/richlv/followers","following_url":"https://api.github.com/users/richlv/following{/other_user}","gists_url":"https://api.github.com/users/richlv/gists{/gist_id}","starred_url":"https://api.github.com/users/richlv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richlv/subscriptions","organizations_url":"https://api.github.com/users/richlv/orgs","repos_url":"https://api.github.com/users/richlv/repos","events_url":"https://api.github.com/users/richlv/events{/privacy}","received_events_url":"https://api.github.com/users/richlv/received_events","type":"User","site_admin":false},"created_at":"2016-09-13T17:51:40Z","updated_at":"2016-09-13T17:51:40Z","body":"i can reproduce it at will by doing an unfiltered event.get ;)\r\nit's not a problem for me now that i know what causes it, but the error message is quite ugly.\r\nin my naive approach, i'd just check the returned value for being an empty string and output a user friendly error message, although erroring out with a better message if it's non-empty non-json might be useful, too"}}
{"actor":{"display_login":"richlv"}}