public async ValueTask <IActionResult> PostAsync(User user) { CreateUserResponse resp = new CreateUserResponse(); try { resp.UserID = await UserBO.CreateUserAsync(user); } catch (InvalidOperationException inex) { return(BadRequest(new ErrorResponse(inex.Message))); } catch (Exception ex) { _logger.LogError(ex.Message); return(StatusCode(500, new ErrorResponse(ex.Message))); } return(Ok(resp.UserID)); }