Closed rmourato closed 8 years ago
Normally we'd wrap it in to some more meaningful response so we can encapsulate other errors etc... but seeing as its so simple returning null seems fine.
Nice to see AppVeyor playing nicely now too!
I'll merge this in.
Yes, could perhaps extend CompaniesHouseClientResponse<T>
to have this info in?
Will look into it if/when I do further changes.
Thanks for merging this in.
Hi again,
Yesterday I missed a basic scenario - attempting to retrieve a profile for an invalid company number...
Rather than forcing users to handle this exception it feels more idiomatic to return a null
CompanyProfile
on 404s, while still throwing on other non-success codes.Proposed implementation is provided. I updated my tests to cover this scenario and keep a behavioral structure, but they may not follow the exact same style of your other ones. If you'd like them structured differently just let me know.
Cheers, Rui