{"record":{"id":"0f1fad55681d9d6f","repo":"tinyhumansai/openhuman","slug":"provider-is-required","errorCode":null,"errorMessage":"provider is required","messagePattern":"provider is required","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/api/rest.rs","lineNumber":452,"sourceCode":"    /// drive a non-JSON request shape (e.g. `multipart/form-data` uploads\n    /// for cloud STT) without re-implementing TLS/proxy plumbing.\n    pub fn raw_client(&self) -> &Client {\n        &self.client\n    }\n\n    /// Resolve a backend-relative path against the configured base URL.\n    /// Mirrors what `authed_json` does internally so callers using\n    /// `raw_client()` don't have to assemble URLs by hand.\n    pub fn url_for(&self, path: &str) -> Result<Url> {\n        self.base\n            .join(path.trim_start_matches('/'))\n            .with_context(|| format!(\"build URL for {path}\"))\n    }\n\n    /// Returns the URL for initiating a login flow for a specific provider.\n    pub fn login_url(&self, provider: &str) -> Result<Url> {\n        let p = provider.trim().trim_matches('/');\n        anyhow::ensure!(!p.is_empty(), \"provider is required\");\n        self.base\n            .join(&format!(\"auth/{p}/login\"))\n            .context(\"build login URL\")\n    }\n\n    /// Initiates an OAuth connection flow for the current user and a specific provider.\n    pub async fn connect(\n        &self,\n        provider: &str,\n        bearer_jwt: &str,\n        skill_id: Option<&str>,\n        response_type: Option<&str>,\n        encryption_mode: Option<&str>,\n    ) -> Result<ConnectResponse> {\n        let p = provider.trim().trim_matches('/');\n        anyhow::ensure!(!p.is_empty(), \"provider is required\");\n        let query = {\n            let mut serializer = url::form_urlencoded::Serializer::new(String::new());","sourceCodeStart":434,"sourceCodeEnd":470,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/api/rest.rs#L434-L470","documentation":"login_url requires the OAuth provider slug to know which authorization endpoint to build; an empty/absent provider leaves no route to construct, so the request is rejected before any URL is assembled.","triggerScenarios":"Thrown at src/api/rest.rs:452 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the provider identifier expected by the backend (e.g. 'google')","Check that the provider field is a non-empty string in the call"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}