Improved error messages for invalid requests