update to return status code and message

also log what is return for better issue tracking experience