{"action":"created","issue":{"url":"https://api.github.com/repos/HealthCatalyst/Fabric.Terminology/issues/90","repository_url":"https://api.github.com/repos/HealthCatalyst/Fabric.Terminology","labels_url":"https://api.github.com/repos/HealthCatalyst/Fabric.Terminology/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/HealthCatalyst/Fabric.Terminology/issues/90/comments","events_url":"https://api.github.com/repos/HealthCatalyst/Fabric.Terminology/issues/90/events","html_url":"https://github.com/HealthCatalyst/Fabric.Terminology/issues/90","id":297268630,"number":90,"title":"Error Messages not passing through","user":{"login":"corytak","id":9749465,"avatar_url":"https://avatars2.githubusercontent.com/u/9749465?v=4","gravatar_id":"","url":"https://api.github.com/users/corytak","html_url":"https://github.com/corytak","followers_url":"https://api.github.com/users/corytak/followers","following_url":"https://api.github.com/users/corytak/following{/other_user}","gists_url":"https://api.github.com/users/corytak/gists{/gist_id}","starred_url":"https://api.github.com/users/corytak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corytak/subscriptions","organizations_url":"https://api.github.com/users/corytak/orgs","repos_url":"https://api.github.com/users/corytak/repos","events_url":"https://api.github.com/users/corytak/events{/privacy}","received_events_url":"https://api.github.com/users/corytak/received_events","type":"User","site_admin":false},"labels":[{"id":646377189,"url":"https://api.github.com/repos/HealthCatalyst/Fabric.Terminology/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-14T22:29:35Z","updated_at":"2018-02-17T22:27:02Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"This is user error on my part. Passing in an array of CodeOperations that had the same guid for add and remove. When I stepped through the code I got this error message from  `ValueSetModule.PatchValueSet() attemp.Exception`:\r\n>Database operation expected to affect 1 row(s) but actually affected 2 row(s). Data may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.\r\n\r\nInstead I got this back:\r\n>{\"code\":\"InternalServerError\",\"message\":\"Failed to update a value set\",\"target\":\"ValueSetApiModel\",\"details\":null,\"innererror\":null}"},"comment":{"url":"https://api.github.com/repos/HealthCatalyst/Fabric.Terminology/issues/comments/366475986","html_url":"https://github.com/HealthCatalyst/Fabric.Terminology/issues/90#issuecomment-366475986","issue_url":"https://api.github.com/repos/HealthCatalyst/Fabric.Terminology/issues/90","id":366475986,"user":{"login":"rustyswayne","id":1865016,"avatar_url":"https://avatars0.githubusercontent.com/u/1865016?v=4","gravatar_id":"","url":"https://api.github.com/users/rustyswayne","html_url":"https://github.com/rustyswayne","followers_url":"https://api.github.com/users/rustyswayne/followers","following_url":"https://api.github.com/users/rustyswayne/following{/other_user}","gists_url":"https://api.github.com/users/rustyswayne/gists{/gist_id}","starred_url":"https://api.github.com/users/rustyswayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rustyswayne/subscriptions","organizations_url":"https://api.github.com/users/rustyswayne/orgs","repos_url":"https://api.github.com/users/rustyswayne/repos","events_url":"https://api.github.com/users/rustyswayne/events{/privacy}","received_events_url":"https://api.github.com/users/rustyswayne/received_events","type":"User","site_admin":false},"created_at":"2018-02-17T22:27:01Z","updated_at":"2018-02-17T22:27:01Z","author_association":"COLLABORATOR","body":"Your use case illustrates that there needs to be some additional validation on the PATCH model and the API probably should have returned a **BadRequest** rather than an **InternalServerError** in this case with a message indicating you have duplicate keys.  I think it's OK to obfuscate the underlying database error to the API as long as it's logged by the service - server side.   @j2jensen two bits?"}}
{"actor":{"display_login":"rustyswayne"}}