Add missing HTTP error codes to two responses
Noticed with some additional type annotations (to be added separately).