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.

[FEATURE] Add handle exceptions for exception handlers

See original GitHub issue

Example of use

    @app.exception_handler(errors.BaseError)
    async def handle_BaseError_error(request, exception):
        raise fastapi.exceptions.HTTPException(400, format_ccxt_errors(exception))

Expect fastapi return response. Got 500 error.

It needs for unifying responses in api.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
phy25commented, May 7, 2020

My two cents: I guess exception handlers are supposed to deal with its own exceptions (probably by try...catch...) or you will kind of get into a loop…

0reactions
github-actions[bot]commented, Jun 18, 2020

Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Complete Guide to Exception Handling in Spring Boot
This article showcases various ways to handle exceptions in a Spring Boot Application.
Read more >
Java Exception Handling: How to Specify and ... - Stackify
You can either use the try-catch-finally approach to handle all kinds of exceptions. Or you can use the try-with-resource approach which allows ...
Read more >
Handle errors in ASP.NET Core | Microsoft Learn
In the following example, UseExceptionHandler adds the exception handling middleware in non-Development environments:.
Read more >
Exception Handling in Spring MVC
Using @ExceptionHandler​​ You can add extra ( @ExceptionHandler ) methods to any controller to specifically handle exceptions thrown by request  ...
Read more >
How to Handle Exceptions in Java - Rollbar
The simple guide to exception handling in Java. ✓ Harden your app against unexpected errors ✓ Respond more effectively ✓ Adapt to any ......
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