PoracleJS icon indicating copy to clipboard operation
PoracleJS copied to clipboard

Hastebin not available for tracked command

Open Fabio1988 opened this issue 2 years ago • 1 comments

Expected Behavior

If the tracking list is too long we should receive a hastebin url for tracking list

Current Behavior

we never receive a hastebin url, we always receive a file attachment. error in logs:

warn: Hastebin seems down, got error:  
Service Temporarily Unavailable { "stack":"Error: Service Temporarily Unavailable
    at PoracleTelegramState.module.exports [as hastebin] (/usr/src/app/node_modules/hastebin-gen/src/index.js:17:24)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.exports.run (/usr/src/app/src/lib/poracleMessage/commands/tracked.js:381:22)
    at async Object.module.exports (/usr/src/app/src/lib/telegram/commands/tracked.js:16:3)
    at async execute (/usr/src/app/node_modules/telegraf/lib/composer.js:471:17)
    at async /usr/src/app/node_modules/telegraf/lib/composer.js:472:21
    at async execute (/usr/src/app/node_modules/telegraf/lib/composer.js:471:17)
    at async /usr/src/app/node_modules/telegraf/lib/composer.js:472:21
    at async execute (/usr/src/app/node_modules/telegraf/lib/composer.js:471:17)
    at async /usr/src/app/node_modules/telegraf/lib/composer.js:472:21
    at async execute (/usr/src/app/node_modules/telegraf/lib/composer.js:471:17)
    at async /usr/src/app/node_modules/telegraf/lib/composer.js:472:21
    at async execute (/usr/src/app/node_modules/telegraf/lib/composer.js:471:17)
    at async /usr/src/app/node_modules/telegraf/lib/composer.js:472:21
    at async execute (/usr/src/app/node_modules/telegraf/lib/composer.js:471:17)"}

Possible Solution

I am not sure, I checked the repo Poracle is using. I also checked hastebin itself. I tried the mentioned API Endpoint request, but response is always invalid.

Steps to Reproduce (for bugs)

Create a tracking list which does not fit into the response, so Poracle will use hastebin

Your Environment

latest develop in Docker

Fabio1988 avatar Sep 29 '22 07:09 Fabio1988

they forced now auth to use their api, find more about it in the documentation.

curl --request POST --url https://hastebin.com/documents --header "content-type: text/plain" --data "Hello World" 
{"message":"Unauthorized request: missing access token. To generate a token, go to https://toptal.com/developers/hastebin/documentation and follow the instructions."}

Fabio1988 avatar Feb 07 '23 16:02 Fabio1988