Skip to content
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

Webhooks explanation is needed on Settings > API page #10287

Closed
Alys opened this issue Apr 26, 2018 · 6 comments · Fixed by #10782
Closed

Webhooks explanation is needed on Settings > API page #10287

Alys opened this issue Apr 26, 2018 · 6 comments · Fixed by #10782

Comments

@Alys
Copy link
Contributor

Alys commented Apr 26, 2018

On the Settings > API page, there's a Webhooks section. It needs one or two sentences under the heading to explain what it's for (e.g., a very brief description of what webhooks are, maybe a link to a good website for more details, and a message that if you don't know what a webhook is, it's best to leave the section empty because incorrect values can cause errors/slowness).

I'll write a proposed message in the next few days.


This is necessary because some players have been using the webhooks section for recording normal website URLs (presumably pages that they use often) and I suspect that is the cause of server errors we've been seeing like the one below, from a user who had https://oldgods.net/habitrpg/habitrpg_user_data_display.html?uuid=12345678-7b8f-435b-8152-06a502ebe37e entered as a webhook.

http:
clientHost:....
contentType:application/json
json:
level:error
message:ParseError: Unexpected token < in JSON at position 0 in "https://oldgods.net/habitrpg/habitrpg_user_data_display.html?uuid=12345678-7b8f-435b-8152-06a502ebe37e":
<!doctype html>
<html lang="en">
<head>
   <meta charset="utf-8">
   <title...
   at stream.catch.then.data (/usr/src/habitrpg/node_modules/got/index.js:366:15)
   at <anonymous>
   at process._tickDomainCallback (internal/process/next_tick.js:228:7)
timestamp:2018-04-16T19:17:52.002Z
fullError:
host:oldgods.net
hostname:oldgods.net
method:POST
name:ParseError
path:/habitrpg/habitrpg_user_data_display.html?uuid=12345678-7b8f-435b-8152-06a502ebe37e
protocol:https:
statusCode:200
statusMessage:OK
url:https://oldgods.net/habitrpg/habitrpg_user_data_display.html?uuid=12345678-7b8f-435b-8152-06a502ebe37e
@natfarleydev
Copy link
Contributor

@Alys is this done now?

@Alys
Copy link
Contributor Author

Alys commented Oct 11, 2018

Ah no, I still need to write that message. :( I'll get that done this weekend. Thanks @nasfarley88

@natfarleydev
Copy link
Contributor

natfarleydev commented Oct 11, 2018 via email

@Alys
Copy link
Contributor Author

Alys commented Oct 14, 2018

Here's my proposed message to be placed on on the Settings > API page under the "Webhooks" title:

Habitica provides webhooks so that when certain actions occur
in your account, information can be sent to a script on another
website. You can specify those scripts here. Be careful with this
feature because specifying an incorrect URL can cause errors
or slowness in Habitica. For more information, see the wiki's
[Webhooks](https://habitica.wikia.com/wiki/Webhooks) page.

(You don't need to use that short-line-wrapped format; I'm just using it here so the message can be seen without horizontal scrolling.)

I'll wait a few days to see if the staff have comments about the message and then I'll mark this as help wanted.

@natfarleydev
Copy link
Contributor

I'm happy to implement this once it is approved.

@Alys
Copy link
Contributor Author

Alys commented Oct 17, 2018

@nasfarley88 Thanks! I've marked it in progress for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants