Closed sthewissen closed 7 years ago
You guys are going way to fast for me ;) Normally on web api's I work on we only return http error codes and no special exceptions so that a wide range of programs can consume it. And the rest parser uses those http codes client side to handle them. Generally we then show a notification somewhere in the app if there was a real exception and return null or empty list. Listviews show message indicating no data found if needed....
Keep up @Depechie! It's done almost already 😉
Fixed the issue in the NuGet. No result now just returns an empty collection. Updated package and code accordingly in #24
Fixed and merged, ciao!
Currently the API returns an exception of type
BeenPwnedUnavailableException
with a message "Not Found" when no breaches are found. There are a few alternatives to this:List<Breach>
.We probably need to make a choice on what the best option is @Depechie @jfversluis. Imho 3 is not the way to go due to the message "Not Found" being a string and all.