{"record":{"id":"01a3390b978db098","repo":"languagetool-org/languagetool","slug":"this-is-the-languagetool-api-you-have-not-specifi","errorCode":null,"errorMessage":"This is the LanguageTool API. You have not specified any parameters. Please see ","messagePattern":"This is the LanguageTool API\\. You have not specified any parameters\\. Please see ","errorType":"http","errorClass":"BadRequestException","httpStatus":400,"severity":"warning","filePath":"languagetool-server/src/main/java/org/languagetool/server/LanguageToolHttpHandler.java","lineNumber":223,"sourceCode":"        return;\n      }\n      if (allowedIps == null || allowedIps.contains(origAddress)) {\n        if (path.startsWith(\"/v2/\")) {\n          ApiV2 apiV2 = new ApiV2(textCheckerV2, config.getAllowOriginUrl());\n          String pathWithoutVersion = path.substring(\"/v2/\".length());\n          final Map<String, String> finalParameters = parameters;\n          final String finalRemoteAddress = remoteAddress;\n          TelemetryProvider.INSTANCE.createSpan(\"/v2\", Attributes.empty(), () -> apiV2.handleRequest(pathWithoutVersion, httpExchange, finalParameters, errorRequestLimiter, finalRemoteAddress, config));\n        } else if (path.endsWith(\"/Languages\")) {\n          throw new BadRequestException(\"You're using an old version of our API that's not supported anymore. Please see \" + API_DOC_URL);\n        } else if (path.equals(\"/\")) {\n          throw new BadRequestException(\"Missing arguments for LanguageTool API. Please see \" + API_DOC_URL);\n        } else if (path.contains(\"/v2/\")) {\n          throw new BadRequestException(\"You have '/v2/' in your path, but not at the root. Try an URL like 'http://server/v2/...' \");\n        } else if (path.equals(\"/favicon.ico\")) {\n          sendError(httpExchange, HttpURLConnection.HTTP_NOT_FOUND, \"Not found\");\n        } else {\n          throw new BadRequestException(\"This is the LanguageTool API. You have not specified any parameters. Please see \" + API_DOC_URL);\n        }\n      } else {\n        String errorMessage = \"Error: Access from \" + StringTools.escapeXML(origAddress) + \" denied\";\n        sendError(httpExchange, HttpURLConnection.HTTP_FORBIDDEN, errorMessage);\n        throw new RuntimeException(errorMessage);\n      }\n    } catch (Exception e) {\n      String response;\n      int errorCode;\n      boolean textLoggingAllowed = false;\n      boolean logStacktrace = true;\n      Throwable rootCause = ExceptionUtils.getRootCause(e);\n      if (e instanceof TextTooLongException || rootCause instanceof TextTooLongException) {\n        errorCode = HttpURLConnection.HTTP_ENTITY_TOO_LARGE;\n        response = e.getMessage();\n        logStacktrace = false;\n      } else if (e instanceof ErrorRateTooHighException || rootCause instanceof ErrorRateTooHighException) {\n        errorCode = HttpURLConnection.HTTP_BAD_REQUEST;","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/languagetool-org/languagetool/blob/2e990059ce67d5e2a0f7f7ca5d31160c6709df4b/languagetool-server/src/main/java/org/languagetool/server/LanguageToolHttpHandler.java#L205-L241","documentation":"Fallback error thrown for any recognized path that is neither '/', '/favicon.ico', nor contains '/v2/'. It indicates a request to the LanguageTool API with no parameters and no valid endpoint, distinct from the root-path case.","triggerScenarios":"Requests to paths like '/check' (missing version), '/v2' (no trailing slash/endpoint), or any unrecognized path on the server.","commonSituations":"Older client integrations pointing at the pre-/v2 API, typos in endpoint URLs, health-check probes hitting arbitrary paths.","solutions":["Use POST /v2/check with text and language parameters","Fix the endpoint URL to include the /v2/ prefix and endpoint name","Check for URL typos or truncated configuration values in the client"],"exampleFix":"// before\ncurl http://localhost:8081/check?text=hi\n// after\ncurl -X POST http://localhost:8081/v2/check -d 'text=hi&language=en-US'","handlingStrategy":"validation","validationCode":"const p = new URL(endpoint).pathname;\nif (!p.startsWith('/v2/')) throw new Error(`Endpoint must be /v2/<name>, got '${p}'`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include the full /v2/check path in client config","Watch for config values truncated at 'v2' during templating","Keep client SDK versions aligned with the server's API version"],"tags":["http","languagetool","wrong-endpoint"],"backgroundTag":"invalid-url","analyzedSha":"2e990059ce67d5e2a0f7f7ca5d31160c6709df4b","analyzedAt":"2026-09-06T09:20:17.015Z","contentChangedAt":"2026-09-06T09:20:17.015Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}