{"record":{"id":"9dfc94c1cd262414","repo":"owasp-amass/amass","slug":"unable-to-parse-engine-api-uri-query-parameters","errorCode":null,"errorMessage":"unable to parse engine API URI query parameters: %v","messagePattern":"unable to parse engine API URI query parameters: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/engineapi.go","lineNumber":151,"sourceCode":"\tapi := &EngAPI{\n\t\tURL:      apiURI,\n\t\tScheme:   u.Scheme,\n\t\tUsername: u.User.Username(),\n\t\tPath:     apiURIPath,\n\t\tHost:     u.Hostname(), // Hostname without port\n\t\tPort:     u.Port(),     // Get port\n\t}\n\t// If a password is set in the URI, it's extracted and stored in the EngAPI object.\n\tpassword, isSet := u.User.Password()\n\tif isSet {\n\t\tapi.Password = password\n\t}\n\t// If there are query parameters present in the URI, they are parsed and encoded as a string,\n\t// then stored in the EngAPI object's Options field. If parsing fails, an error is returned.\n\tif u.RawQuery != \"\" {\n\t\tqueryParams, err := url.ParseQuery(u.RawQuery)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"unable to parse engine API URI query parameters: %v\", err)\n\t\t}\n\t\tapi.Options = queryParams.Encode() // Encode url.Values to a string\n\t}\n\t// The Config's EngineAPI field is set to the newly created EngAPI object.\n\tc.EngineAPI = api\n\treturn nil\n}\n","sourceCodeStart":133,"sourceCodeEnd":159,"githubUrl":"https://github.com/owasp-amass/amass/blob/79299dce87b0085db0f2f4ef3e9c52cccb49f514/config/engineapi.go#L133-L159","documentation":"The engine API URI contains a query string (u.RawQuery != \"\") but url.ParseQuery failed to decode it — typically malformed percent-encoding or an invalid separator sequence. The query params are meant to be re-encoded into EngAPI.Options; the parse error is wrapped with %v.","triggerScenarios":"Thrown at config/engineapi.go:151 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Percent-encode special characters in the URI query correctly (avoid stray '%' or unencoded separators)","Simplify or remove unnecessary query parameters from the engine URI","Wrap with %w so the underlying url.EscapeError (naming the bad escape) reaches the user"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"79299dce87b0085db0f2f4ef3e9c52cccb49f514","analyzedAt":"2026-09-06T08:22:48.198Z","contentChangedAt":"2026-09-06T08:22:48.198Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}