public async Task <ActionResult <Guid> > DeleteOrganizationAsync(Guid orgId) { var currentUserId = GetCurrentUserId(); try { await organizationManager.DeleteAsync(orgId, currentUserId); return(Ok(orgId)); } catch (ArgumentNullException ane) { logger.LogDebug(ane.Message + "\n" + ane.StackTrace); return(NotFound($"Can't find organization {orgId}")); } catch (MethodAccessException mae) { logger.LogDebug(mae.Message + "\n" + mae.StackTrace); logger.LogDebug($"User {currentUserId} has no rights to delete organization {orgId}"); return(Forbid(JwtBearerDefaults.AuthenticationScheme, CookieAuthenticationDefaults.AuthenticationScheme)); } catch (Exception ex) { logger.LogDebug(ex.Message + "\n" + ex.StackTrace); return(StatusCode(500)); } }