Thank you. Very useful explanation! I gather this is only meant to be used with unhandled exceptions. For all those cases where I want to throw a 4XX error, my endpoints should instead return their own problem details object and not go through this middleware. Is that correct?
my dotnet core application is communicating to microservice. from microservice i am getting 400 error, but my dotnet core app is coverting to 400 to 500 status code storing in azure log as 500 (server is not found ) how its possible. i want to store same 400 into my azure logs. can you please suggest better way? thanks advance
Thank sir, have learned a lot from your tutorials.
Glad to hear that!
I learned a lot with this tutorial. Thank you
Glad it was helpful!
Nice work Julio, as always!!!
Thank you, Marcelo!
Good job don't stop!
Thanks, I won't!
Great explanation. Thanks
Glad it was helpful!
This was very helpful. Thanks!
Glad it was helpful!
Thanks for this topic
Most welcome
Like the content Julio😊!
Great to know Ali!
Thank you! Very helpful!!!
Glad it was helpful!
Hey Julio, thank you for the video!
Would be cool if you extend this video for people that program to exceptions.
Pedro, you're welcome! Could you explain a bit the "program to exceptions" part?
@@juliocasal using custom exceptions, (instead of using OneOf for example).
Thank you. Very useful explanation! I gather this is only meant to be used with unhandled exceptions. For all those cases where I want to throw a 4XX error, my endpoints should instead return their own problem details object and not go through this middleware. Is that correct?
In that case I would add a mapping function to my exception handling middleware. Maps specific exceptions to HTTP error codes.
my dotnet core application is communicating to microservice. from microservice i am getting 400 error, but my dotnet core app is coverting to 400 to 500 status code storing in azure log as 500 (server is not found ) how its possible. i want to store same 400 into my azure logs. can you please suggest better way? thanks advance
You would need to debug your app.
is very gooooooood 🙂😊🤩👍👍💪
Thank you!
Nice approach, but can i use Try and Catch in my code to override this?
Yes, you can
Thank you! Great content!
Glad you liked it!