I was experiencing strange behaviour of Client::Miscellaneous#edit
method, because it somehow rendered the page (as HTML) when I wanted
to edit a comment.
However the comment was edited, the problem was, that the response was a HTML
DOM, which then raised a rate limit error because somewhere in that
DOM there was "RATELIMIT" written and that matched in
Error#from_status_code_and_body.
So I added the api_type key and it worked fine.
Plus I added a little guard to verify that options is a hash.
When I first used the edit function I just passed the text as the
second parameter, which then gave me a silly error that string cannot be converted into Integer.
I was experiencing strange behaviour of Client::Miscellaneous#edit method, because it somehow rendered the page (as HTML) when I wanted to edit a comment.
However the comment was edited, the problem was, that the response was a HTML DOM, which then raised a rate limit error because somewhere in that DOM there was "RATELIMIT" written and that matched in Error#from_status_code_and_body.
So I added the api_type key and it worked fine. Plus I added a little guard to verify that
options
is a hash. When I first used the edit function I just passed the text as the second parameter, which then gave me a silly error that string cannot be converted into Integer.