question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Randomly getting 500 error when sending links

See original GitHub issue

Bug Report

Form

Put an [x] if you meet the condition, else leave [ ].

Requirements

  • I’ve searched the Issues
  • I’ve read the basic concepts
  • I’m using the latest version
  • I’ve debugged my code using the DEBUG variable.

Platform

  • I’m using Node.js version v12.14.0 (node -v)
  • I’m using electron
  • I’m using the browser YOUR_BROWSER_AND_VERSION
  • I’m using some other environment YOUR_ENV

Description

I’m randomly getting a 500 Internal Server Error when the messages I send is containing links. Sometimes it works, sometimes it doesn’t work. Do you know why?

YOUR DESCRIPTION HERE

Code

Just a broadcastText that contain a link.

Error and Output

(node:44377) UnhandledPromiseRejectionWarning: IgResponseError: POST /api/v1/direct_v2/threads/broadcast/link/ - 500 Internal Server Error; 
    at Request.handleResponseError (/Users/simon/Documents/GitHub/pronote-bot/node_modules/instagram-private-api/dist/core/request.js:121:16)
    at Request.send (/Users/simon/Documents/GitHub/pronote-bot/node_modules/instagram-private-api/dist/core/request.js:50:28)
    at async DirectThreadRepository.broadcast (/Users/simon/Documents/GitHub/pronote-bot/node_modules/instagram-private-api/dist/repositories/direct-thread.repository.js:176:26)
    at async DirectThreadEntity.broadcast (/Users/simon/Documents/GitHub/pronote-bot/node_modules/instagram-private-api/dist/entities/direct-thread.entity.js:157:26)
    at async DirectThreadEntity.broadcastLink (/Users/simon/Documents/GitHub/pronote-bot/node_modules/instagram-private-api/dist/entities/direct-thread.entity.js:69:16)
    at async InstaUser.send (/Users/simon/Documents/GitHub/pronote-bot/instagram/InstaUser.js:20:9)
(node:44377) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:44377) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Androz2091commented, Feb 6, 2020

Thank you! I will test this as soon as possible

0reactions
Nerixyzcommented, Feb 6, 2020

Ok! And even if the message contains text too? For example Hello, here is the link: https://google.fr, we should use broadcastLink()?

You have your message as it is and your links as an array.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is a 500 Internal Server Error? - Allconnect.com
A 500 Internal Server Error is an umbrella term for several issues often involving the server of the website you're trying to reach....
Read more >
How to Fix a 500 Internal Server Error - Lifewire
The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the website's server, but...
Read more >
What Is a 500 Internal Server Error, and How Do I Fix It?
A 500 Internal Server error means that the website you were trying to connect to has experienced a problem and can't provide a...
Read more >
500 error: how to solve - SupportHost
The 500 error is a server error and occurs when the requested address cannot be reached. Let's see what it depends on and...
Read more >
What is “HTTP 500 Internal Server Error” and How to Fix It?
The HTTP 500 error, in particular, indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. In other...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found