{"record":{"id":"a7e051105c5743b5","repo":"sipeed/picoclaw","slug":"invalid-pico-token","errorCode":null,"errorMessage":"Invalid Pico token","messagePattern":"Invalid Pico token","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"web/backend/api/pico.go","lineNumber":189,"sourceCode":"\t\th.createWsProxy(origProtocol, upstreamProtocol).ServeHTTP(w, r)\n\t}\n}\n\nfunc (h *Handler) handlePicoMediaProxy() http.HandlerFunc {\n\treturn func(w http.ResponseWriter, r *http.Request) {\n\t\tif !h.gatewayAvailableForProxy() {\n\t\t\tlogger.Warnf(\"Gateway not available for Pico media proxy\")\n\t\t\thttp.Error(w, \"Gateway not available\", http.StatusServiceUnavailable)\n\t\t\treturn\n\t\t}\n\n\t\tgateway.mu.Lock()\n\t\tpicoToken := gateway.picoToken\n\t\tgateway.mu.Unlock()\n\n\t\tif picoToken == \"\" {\n\t\t\tlogger.Warnf(\"Missing Pico token for media proxy\")\n\t\t\thttp.Error(w, \"Invalid Pico token\", http.StatusForbidden)\n\t\t\treturn\n\t\t}\n\n\t\th.createPicoHTTPProxy(picoToken).ServeHTTP(w, r)\n\t}\n}\n\n// handleGetPicoInfo returns non-secret Pico connection info for the launcher UI.\n//\n//\tGET /api/pico/info\nfunc (h *Handler) handleGetPicoInfo(w http.ResponseWriter, r *http.Request) {\n\tcfg, err := config.LoadConfig(h.configPath)\n\tif err != nil {\n\t\thttp.Error(w, fmt.Sprintf(\"Failed to load config: %v\", err), http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\th.writePicoInfoResponse(w, r, cfg, nil)","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/web/backend/api/pico.go#L171-L207","documentation":"Error \"Invalid Pico token\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at web/backend/api/pico.go:189 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}