{"record":{"id":"90c692a532ce7027","repo":"BoundaryML/baml","slug":"failed-to-get-url-w","errorCode":null,"errorMessage":"failed to get URL: %w","messagePattern":"failed to get URL: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/language_client_go/pkg/rawobjects_http_request.go","lineNumber":44,"sourceCode":"\nfunc (h *httpRequest) RequestId() (string, error) {\n\tresult, err := raw_objects.CallMethod(h, \"id\", nil)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to get ID: %w\", err)\n\t}\n\n\tid, ok := result.(string)\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"unexpected type for ID: %T\", result)\n\t}\n\n\treturn id, nil\n}\n\nfunc (h *httpRequest) Url() (string, error) {\n\tresult, err := raw_objects.CallMethod(h, \"url\", nil)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to get URL: %w\", err)\n\t}\n\n\turl, ok := result.(string)\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"unexpected type for URL: %T\", result)\n\t}\n\n\treturn url, nil\n}\n\nfunc (h *httpRequest) Method() (string, error) {\n\tresult, err := raw_objects.CallMethod(h, \"method\", nil)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to get method: %w\", err)\n\t}\n\n\tmethod, ok := result.(string)\n\tif !ok {","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/engine/language_client_go/pkg/rawobjects_http_request.go#L26-L62","documentation":"httpRequest.Url() invokes the runtime object's 'url' method via the raw-objects bridge. 'failed to get URL: %w' means the bridge call failed — the runtime object could not execute 'url', so no URL value was produced.","triggerScenarios":"Calling Url() on a request whose backing raw object is invalid or detached, or whose 'url' method raises in the runtime.","commonSituations":"Using a request object after runtime disposal; handler scripts that error while computing the URL; API changes between client and runtime versions.","solutions":["Inspect the wrapped cause (%w) to identify the underlying failure","Ensure the request object is used within the same dispatch/lifecycle it was created in","Confirm the runtime exposes a working 'url' method for this request kind","Re-dispatch the request if the object is stale"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if req == nil { return errors.New(\"request unavailable\") }","typeGuard":"func (h *httpRequest) hasURL() bool { return h != nil && h.RawObject != nil }","tryCatchPattern":"u, err := req.Url()\nif err != nil {\n    return fmt.Errorf(\"cannot read request URL: %w\", err)\n}","preventionTips":["Access the URL within the dispatch lifecycle","Keep handler 'url' implementations exception-free","Sync client and runtime versions"],"tags":["go","runtime-bridge","url"],"backgroundTag":"method-not-implemented","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}