update error handling for illegal request parameters