Simplify error message set and add HTTPReply struct
Simplify error handling using HTTPReply