Add specific exceptions for bad query and documentation.