static final int STATUS_CODE = HttpURLConnection.HTTP_BAD_REQUEST;
public static BadRequest create(String msg) {
ErrorInfo errInfo = ErrorInfo.parse(msg);
ErrorType type = errInfo.getErrorType();
if (type == ErrorType.UNSUPPORTED_FILE_FORMAT) {
return new UnsupportedFileFormat(errInfo.getErrorMessage());
}
else if (type == ErrorType.UNSUPPORTED_QUERY_LANGUAGE) {
return new UnsupportedQueryLanguage(errInfo.getErrorMessage());