Catch 404 and 401 Annotations for custom message

Close #1221