Skip to content
This repository has been archived by the owner on Jun 27, 2020. It is now read-only.

Fix editusertext action #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix editusertext action #50

wants to merge 1 commit into from

Conversation

siegy22
Copy link

@siegy22 siegy22 commented Feb 23, 2017

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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant