File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Microsoft.SystemForCrossDomainIdentityManagement/Service/Controllers Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -609,6 +609,23 @@ public virtual async Task<ActionResult<Resource>> Post([FromBody]T resource)
609609
610610 throw new HttpResponseException ( HttpStatusCode . NotImplemented ) ;
611611 }
612+ catch ( HttpResponseException httpResponseException )
613+ {
614+ if ( this . TryGetMonitor ( out IMonitor monitor ) )
615+ {
616+ IExceptionNotification notification =
617+ ExceptionNotificationFactory . Instance . CreateNotification (
618+ httpResponseException ,
619+ correlationIdentifier ,
620+ ServiceNotificationIdentifiers . ControllerTemplatePostNotSupportedException ) ;
621+ monitor . Report ( notification ) ;
622+ }
623+
624+ if ( httpResponseException . Response . StatusCode == HttpStatusCode . Conflict )
625+ return this . Conflict ( ) ;
626+ else
627+ return this . BadRequest ( ) ;
628+ }
612629 catch ( Exception exception )
613630 {
614631 if ( this . TryGetMonitor ( out IMonitor monitor ) )
You can’t perform that action at this time.
0 commit comments