{"action":"created","issue":{"url":"https://api.github.com/repos/RSuter/NJsonSchema/issues/801","repository_url":"https://api.github.com/repos/RSuter/NJsonSchema","labels_url":"https://api.github.com/repos/RSuter/NJsonSchema/issues/801/labels{/name}","comments_url":"https://api.github.com/repos/RSuter/NJsonSchema/issues/801/comments","events_url":"https://api.github.com/repos/RSuter/NJsonSchema/issues/801/events","html_url":"https://github.com/RSuter/NJsonSchema/issues/801","id":375429535,"node_id":"MDU6SXNzdWUzNzU0Mjk1MzU=","number":801,"title":"JsonInheritanceConverter throws exception if discriminator is invalid","user":{"login":"TioLuiso","id":8038949,"node_id":"MDQ6VXNlcjgwMzg5NDk=","avatar_url":"https://avatars2.githubusercontent.com/u/8038949?v=4","gravatar_id":"","url":"https://api.github.com/users/TioLuiso","html_url":"https://github.com/TioLuiso","followers_url":"https://api.github.com/users/TioLuiso/followers","following_url":"https://api.github.com/users/TioLuiso/following{/other_user}","gists_url":"https://api.github.com/users/TioLuiso/gists{/gist_id}","starred_url":"https://api.github.com/users/TioLuiso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TioLuiso/subscriptions","organizations_url":"https://api.github.com/users/TioLuiso/orgs","repos_url":"https://api.github.com/users/TioLuiso/repos","events_url":"https://api.github.com/users/TioLuiso/events{/privacy}","received_events_url":"https://api.github.com/users/TioLuiso/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-30T10:58:09Z","updated_at":"2018-10-30T12:11:05Z","closed_at":"2018-10-30T12:11:05Z","author_association":"NONE","body":"Not sure if this is the proper place to put this.\r\n\r\nI have a method that receives a Dto. That Dto has a property that is of an abstract class. I use JsonInheritanceConverter and KnownTypes to deserialize to the proper concrete class. It works mostly perfectly. However, if the received value in discriminator is invalid, it ends up throwing an InvalidOperationException \"Could not find subtype of BaseType with discriminator 'DiscriminatorValue'.\". Since that exception is not captured or handled by anything, that request ends up in a 500 InternalServerError. However, I believe it should be a 400 Bad Request.\r\n\r\nAm I doing anything wrong? is there any way to configure it?"},"comment":{"url":"https://api.github.com/repos/RSuter/NJsonSchema/issues/comments/434276165","html_url":"https://github.com/RSuter/NJsonSchema/issues/801#issuecomment-434276165","issue_url":"https://api.github.com/repos/RSuter/NJsonSchema/issues/801","id":434276165,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDI3NjE2NQ==","user":{"login":"TioLuiso","id":8038949,"node_id":"MDQ6VXNlcjgwMzg5NDk=","avatar_url":"https://avatars2.githubusercontent.com/u/8038949?v=4","gravatar_id":"","url":"https://api.github.com/users/TioLuiso","html_url":"https://github.com/TioLuiso","followers_url":"https://api.github.com/users/TioLuiso/followers","following_url":"https://api.github.com/users/TioLuiso/following{/other_user}","gists_url":"https://api.github.com/users/TioLuiso/gists{/gist_id}","starred_url":"https://api.github.com/users/TioLuiso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TioLuiso/subscriptions","organizations_url":"https://api.github.com/users/TioLuiso/orgs","repos_url":"https://api.github.com/users/TioLuiso/repos","events_url":"https://api.github.com/users/TioLuiso/events{/privacy}","received_events_url":"https://api.github.com/users/TioLuiso/received_events","type":"User","site_admin":false},"created_at":"2018-10-30T12:11:05Z","updated_at":"2018-10-30T12:11:05Z","author_association":"NONE","body":"Hmmmm I see your point. Have to think about it. probably I could use a wrapper around JsonInheritanceConverter.\r\n\r\nAnyway, thanks a lot"}}
{"actor":{"display_login":"TioLuiso"}}