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.

Customized Response for Initial Login Route /login. feat: Customizable error handling.

See original GitHub issue

Is your feature request related to a problem? Please describe. We are looking to use this as a framework for multiple platforms (multiple universities - primary Canvas and Blackboard) to register with our Tool. While registration should be handled via dynamic registration OR out-of-band with the university via a custom setup page on our end, university admins and instructors will miss steps and will end-up hitting our endpoints somehow incorrectly… Currently this library responds with a JSON msg and HTTP 400 with unregistered platforms.

Describe the solution you’d like To do deal with incorrect setups we will need to respond to unregistered platforms with friendly messages (instead of the default JSON msg with a HTTP 400 error) and potentially a link to a registration form. So the solution would be to inject a generic handler for this error “UNREGISTERED_PLATFORM” - example: onUnregisteredPlatform.

Describe alternatives you’ve considered May errors handled prior to on onInvalidToken, have a more generic handler.

Additional context image

While in a perfect world this wouldn’t be an issue, but LMS admins and instructors are not often trained enough and struggle with these setups. With over 100 university setups and many of them being LTI 1.1 configured, we have seen this!

We absolutely can fork and create a PR also for changes.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

scalebigcommented, Dec 11, 2020

Hello @scalebig! I just released a version of Ltijs with the new onUnregisteredPlatform method. Please let me know if this solves your issues.

@Cvmcosta this looks like a great approach! we will give it a shot. Thanks again for digging into that!

scalebigcommented, Dec 6, 2020

BTW - great job from I can see so far! If we integrate this, it will be used by our product that serves over over 50K students currently 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Implement Custom Error Responses in Express - Auth0
Therefore, you need to customize error responses to provide the client with more details about the problem that occurred. This means returning ...
Read more >
Handle errors in ASP.NET Core | Microsoft Learn
To provide a custom error handling page, use the exception handler page. UseStatusCodePages with format string. To customize the response ...
Read more >
Node React app / error handling : How to send custom error ...
I want to send an error msg for example the case where a wrong email is ... password}) => { try { const...
Read more >
Better error handling in JavaScript | by Iain Collins - Medium
Any code already using this function and that was expecting an Error object will be compatible with a custom Error that extends the...
Read more >
A Guide to Error Handling in Express.js | Scout APM Blog
Express Middleware Functions; Default Error Handling in Express.js. Handling Custom Errors. Custom Handling for Each Route; Writing your own ...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found