Your REST API Errors Are Wrong. Problem Details Will Fix This

  Рет қаралды 10,176

Milan Jovanović

Milan Jovanović

Күн бұрын

Пікірлер: 39
@MilanJovanovicTech
@MilanJovanovicTech Күн бұрын
Want to master Clean Architecture? Go here: bit.ly/3PupkOJ Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSt
@paulmdevenney
@paulmdevenney 8 күн бұрын
dude - your timing is impeccable. I was just tidying up my version of the same thing. Took some notes, made some refinements. Thanks as always.
@MilanJovanovicTech
@MilanJovanovicTech 8 күн бұрын
Nice, happy to help!
@ghoulking715
@ghoulking715 8 күн бұрын
we are waiting for the continuation of the series about authorization via keycloak and setting up user roles and attributes 😊
@MilanJovanovicTech
@MilanJovanovicTech 8 күн бұрын
Working on it
@enricoroselino7557
@enricoroselino7557 8 күн бұрын
if girlfriend also have problem details, men doesnt need to think hard
@MilanJovanovicTech
@MilanJovanovicTech 8 күн бұрын
You're screwed either way 😅
@fakhrulhilal
@fakhrulhilal 7 күн бұрын
I've been using Seq for logging for years, but I never realize we can use it for telemetry. Nice video as always.
@MilanJovanovicTech
@MilanJovanovicTech 7 күн бұрын
Tracing is a new feature
@androidsavior
@androidsavior 18 сағат бұрын
Where request it and trace it are stored in the server ? Where are the logs
@luisnataren4149
@luisnataren4149 3 күн бұрын
Hey Milan, do you know when the REST API course will be ready?
@MilanJovanovicTech
@MilanJovanovicTech 3 күн бұрын
January
@10Totti
@10Totti 8 күн бұрын
Best tutorial! But Service ProblemDetails is add with .net 9 ?
@MilanJovanovicTech
@MilanJovanovicTech 8 күн бұрын
No, it's there from way before
@JuanOG
@JuanOG 8 күн бұрын
How about using the hellang problem details package which seems to do this all well enough.
@MilanJovanovicTech
@MilanJovanovicTech 8 күн бұрын
Prefer not to use 3rd party packages for simple things
@sotsch9280
@sotsch9280 6 күн бұрын
How do you handle Results using the Result pattern? First naive thoughts would be simply using a middleware and checking for failed results?... I mainly use Results instead of throwing, except for Domain objects like ValueObjects, they throw if validation fails
@MilanJovanovicTech
@MilanJovanovicTech 6 күн бұрын
if (Failure) - > return Result converted to Problem Details
@sotsch9280
@sotsch9280 6 күн бұрын
@MilanJovanovicTech sorry, I meant not the mapping part, i meant how to handle that globally like with global exception handling. I thought you must have encountered this problem. Or am I missthinking this?
@ivansusic562
@ivansusic562 8 күн бұрын
A kinda offtopic, but - I faced issue with postgres, ef migrations and docker compose - api was trying to do a migration on startup before postgres was ready. Do you have any suggestions here? Btw., great video. I just bought one of your courses - looking forward.
@JollyGiant19
@JollyGiant19 8 күн бұрын
Don’t run migrations on start up, run them outside the application. EF Core gives you a few ways to do that: script or binary.
@MilanJovanovicTech
@MilanJovanovicTech 8 күн бұрын
Use "depends_on" to tell the API container to wait for the DB
@ivansusic562
@ivansusic562 8 күн бұрын
@@MilanJovanovicTech I think I tried it - but it does not meen that postgres is ready if its container is up and running.
@dinulilea4184
@dinulilea4184 8 күн бұрын
Had the same issue with sqlx and postgres (rust project) where it tried to run queries at compile time before the posgres db was ready. Turns out there was an SQLX_OFFLINE env var that could be configured for docker compose. Maybe there is something similar with EF Cofe
@Crisicus_01
@Crisicus_01 7 күн бұрын
@@ivansusic562You can add health checks to see if the container is actually ready
@MahbuburRahman-uc7np
@MahbuburRahman-uc7np 8 күн бұрын
How are you showing inline values during debug in Visual Studio?
@MilanJovanovicTech
@MilanJovanovicTech 7 күн бұрын
ReSharper
@emanuelcordovamontiel1017
@emanuelcordovamontiel1017 8 күн бұрын
Thank a lots, Milan!. Where can I found the source code of this solution?
@MilanJovanovicTech
@MilanJovanovicTech 8 күн бұрын
Here: www.patreon.com/milanjovanovic
@jeancarlosreyesencarnacion
@jeancarlosreyesencarnacion 8 күн бұрын
I know it's gonna be good. 🙌🙌
@MilanJovanovicTech
@MilanJovanovicTech 8 күн бұрын
Was it?
@jeancarlosreyesencarnacion
@jeancarlosreyesencarnacion 8 күн бұрын
@MilanJovanovicTech Yes, it was. 🤙
@cuserroro
@cuserroro 8 күн бұрын
I realy like!!
@MilanJovanovicTech
@MilanJovanovicTech 8 күн бұрын
Thanks
@lolyasuo1235
@lolyasuo1235 7 күн бұрын
How something that is fully opinionated can be wrong? Both approaches are just fine. I am sorry to say this, but I miss old era where developers were thinking about a solution. Today in many cases we are simply following guidelines (use ProblemDetails, use Result etc).
@MilanJovanovicTech
@MilanJovanovicTech 7 күн бұрын
You didn't explain how it can be wrong
@MahmoudSaed98
@MahmoudSaed98 8 күн бұрын
@MilanJovanovicTech
@MilanJovanovicTech 8 күн бұрын
Much appreciated
The Right Way To Build Async APIs in ASP.NET Core
20:12
Milan Jovanović
Рет қаралды 11 М.
Master Refresh Tokens in ASP.NET Core (building from scratch)
17:19
Milan Jovanović
Рет қаралды 9 М.
Интересно, какой он был в молодости
01:00
БЕЗУМНЫЙ СПОРТ
Рет қаралды 3,6 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 44 МЛН
Smart Sigma Kid #funny #sigma
00:33
CRAZY GREAPA
Рет қаралды 36 МЛН
I Scaled My Transactional Outbox to 2B+ messages/day. Here's how
32:34
Milan Jovanović
Рет қаралды 11 М.
The Right Way To Return API Errors in .NET
10:40
Nick Chapsas
Рет қаралды 63 М.
Which API Gateway is better? YARP vs Ocelot
24:01
Milan Jovanović
Рет қаралды 7 М.
2 Best Practices for Returning API Errors in ASP.NET Core
12:39
Milan Jovanović
Рет қаралды 28 М.
This Video is AI Generated! SORA Review
16:41
Marques Brownlee
Рет қаралды 2,8 МЛН
The Fix For Your Database Performance Issues in .NET
9:12
Nick Chapsas
Рет қаралды 81 М.
AI is not Designed for You
8:29
No Boilerplate
Рет қаралды 158 М.
Vite 6 is important, here's why
19:35
Theo - t3․gg
Рет қаралды 98 М.
CRUD APIs are Poor Design
11:20
CodeOpinion
Рет қаралды 12 М.
Clean Architecture with ASP.NET Core 9
27:01
dotnet
Рет қаралды 32 М.
Интересно, какой он был в молодости
01:00
БЕЗУМНЫЙ СПОРТ
Рет қаралды 3,6 МЛН