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.

Better way to catch authentication errors?

See original GitHub issue

Is there a better way to catch authentication errors? At the moment if I run nexmo.initialize(...) with incorrect credentials the callback for a method does NOT return an error object. Instead the response object looks as follows:

{ 'error-code': '401',
  'error-code-label': 'authentication failed' }

There’s a few things that would be useful here.

  1. Catch authentication errors and actually return an error object instead of a response in an API call.
  2. Provide a way to validate nexmo.initialize(...) without making an API call

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
leggettercommented, Apr 29, 2016

I meant check that the credentials have been supplied - not that they existing within the Nexmo platform e.g. check for empty strings, null/undefined values and so on.

0reactions
cbettacommented, Jan 24, 2017

Irrelevant due to many changes since this was opened.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Handling Best Practices - Auth0
Error Handling Best Practices · Send error logs to an external service · Use error objects in rules · Use meaningful error code...
Read more >
WiFi Authentication Errors and Methods to Solve Them - Okta
How to fix a WiFi authentication problem · Forget the network. Head to WiFi settings on your device, find the network you're trying...
Read more >
Handle spring security authentication exceptions with ...
The best way I've found is to delegate the exception to the HandlerExceptionResolver @Component("restAuthenticationEntryPoint") public class ...
Read more >
Error Handling | Firebase Documentation - Google
The Firebase Authentication SDKs provide a simple way for catching the various errors which may occur which using authentication methods.
Read more >
Handle errors and exceptions in MSAL.js - Microsoft Entra
Most errors that come from the library will be ClientAuthErrors. These errors result from things like calling a login method when login is ......
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