File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/AzureOpenAIProxy.ApiApp/Endpoints Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -189,9 +189,19 @@ public static RouteHandlerBuilder AddUpdateAdminEvent(this WebApplication app)
189189
190190 return Results . Ok ( result ) ;
191191 }
192+ catch ( RequestFailedException ex )
193+ {
194+ if ( ex . Status == 404 )
195+ {
196+ logger . LogError ( $ "Failed to update event details with ID: { eventId } ") ;
197+ return Results . NotFound ( ) ;
198+ }
199+
200+ logger . LogError ( ex , $ "Error occurred while updating event details of { eventId } with status { ex . Status } ") ;
201+ return Results . Problem ( ex . Message , statusCode : StatusCodes . Status500InternalServerError ) ;
202+ }
192203 catch ( Exception ex )
193204 {
194- // need to add 404
195205 logger . LogError ( ex , $ "Failed to update event details with ID: { eventId } ") ;
196206
197207 return Results . Problem ( ex . Message , statusCode : StatusCodes . Status500InternalServerError ) ;
You can’t perform that action at this time.
0 commit comments