-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
json: cannot unmarshal array into Go value of type responses.PHIDLookupResponse #27
Comments
Oh and I did search through the issues before posting this, and found that #22 was the same, but that it had been closed as resolved. I wanted to report that it is not resolved, at least for me. |
I'm also seeing this issue when trying to look up a task with |
Turned out my bot didn't have permissions to view that task. |
I've tried making my bot an administrator and I still get the same error. For me, it is also not specific to |
Hm. I'll try to give this a look soon. There are multiple reasons why this could be happening, like authorization or API changes. The main problem being that Gonduit did not got the expected response from Phabricator. Gonduit definitely needs some work on how it reports these issues. I'll open a task for providing a copy of the API response when errors occur (etcinit/gonduit#2). |
Ok, the issue seems to be that Phabricator returns an empty array/object when the response is empty. Golang's JSON decoder parses this as an array, which cannot be converted to a map, hence the error above. I have a fix on the works (ccfabc9) but I need to experiment a bit more. Empty responses seem to happen when the bot doesn't have access to an object or the object simply does not exist. |
Relevant Gonduit commit: etcinit/gonduit@162817d |
This should be fixed in the upcoming 3.0.0 release. |
Thanks! |
Consistently getting this error:
I'm on the latest master branch of Phabricator, and I have tried both release
2.3.0
of Phabulous, as well as manually compiling the master branch. I got the same error from both.I've been testing by sending the message "lookup T123" to the Phabulous bot, and it has resulted in the above error every time (and the bot responds with an error message in the chat).
Here's my configuration:
The text was updated successfully, but these errors were encountered: