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.

Show a better error when `applicationId` is not set

See original GitHub issue

Is your feature request related to a problem? Please describe. I tried to bot.helpers.upsertApplicationCommands() but was greeted with an unhelpful error message:

Error: [400] The request was improperly formatted, or the server couldn't understand it.

After debugging, I found out that this was because a request was being sent to /applications/undefined/commands. Only then I realised I had to provide an applicationId in createBot().

Describe the solution you’d like

I think it would be better if an error is thrown somewhere either in createBot() or in upsertApplicationCommands() indicating that an application id needs to be set. Either that or the applicationId field should not be optional in the createBot() types.

Describe alternatives you’ve considered The only alternative I can think of is to just deal with it.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Skillz4Killzcommented, Aug 25, 2022

Thank you for reporting, should be patched so it is never undefined again so a better error won’t be needed anymore.

0reactions
lts20050703commented, Jul 26, 2022

@jespertheend That shouldn’t happen because application is parsed from bot id

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix Warning: Application ID is not set? - Stack Overflow
Problem is that this example is deprecated. At the botton of your index.js you will find this code: exports.handler = (event, context) ...
Read more >
Configure the app module - Android Developers
If the application ID is not explicitly defined using the applicationId property, it automatically takes on the same value as the namespace.
Read more >
Unable to determine application id: com.android.tools.idea.run ...
When I Run project then it shows this error, I found many solutions on the net but none of any solutions is working,...
Read more >
Application ID not populated in AndroidManifest for libraries ...
So it seems that application ID value is not available to the manifest merger unless is defined in the build.gradle. My environment: compileSdkVersion...
Read more >
Unexpected error when performing consent to an application
Show 3 more. This article discusses errors that can occur during the process of consenting to an application. If you are troubleshooting ...
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