{"record":{"id":"0bb86bb8ea972200","repo":"gitroomhq/postiz-app","slug":"registration-failed","errorCode":null,"errorMessage":"Registration failed","messagePattern":"Registration failed","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"libraries/nestjs-libraries/src/integrations/social/moltbook.provider.ts","lineNumber":56,"sourceCode":"\n  async generateAuthUrl() {\n    const state = makeId(6);\n    return {\n      url: state,\n      codeVerifier: makeId(10),\n      state,\n    };\n  }\n\n  async registerAgent(name: string, description: string) {\n    const response = await this.getSsrfSafeAxios().post(\n      `${MOLTBOOK_API_BASE}/agents/register`,\n      { name, description },\n      { headers: { 'Content-Type': 'application/json' } }\n    );\n\n    if (!response.data.success) {\n      throw new Error(response.data.error || 'Registration failed');\n    }\n\n    return response.data.agent;\n  }\n\n  async checkAgentStatus(apiKey: string) {\n    const response = await this.getSsrfSafeAxios().get(\n      `${MOLTBOOK_API_BASE}/agents/status`,\n      {\n        headers: { Authorization: `Bearer ${apiKey}` },\n      }\n    );\n\n    return response.data;\n  }\n\n  async getAgentProfile(apiKey: string) {\n    const response = await this.getSsrfSafeAxios().get(","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/gitroomhq/postiz-app/blob/0f1647f7491a217d43eb5ae7a480484bdf0aff3e/libraries/nestjs-libraries/src/integrations/social/moltbook.provider.ts#L38-L74","documentation":"MoltbookProvider.registerAgent calls POST {MOLTBOOK_API_BASE}/agents/register and the response body had success=false. Throws the server-provided error string, falling back to 'Registration failed'. Registration is the bootstrap step for Moltbook agent integrations.","triggerScenarios":"Agent registration payload (name/description) rejected — duplicate agent name, invalid fields, or MOLTBOOK_API_BASE pointing at the wrong environment.","commonSituations":"Misconfigured MOLTBOOK_API_BASE env var, re-registering an existing agent name, Moltbook API schema change, or missing required fields.","solutions":["Read response.data.error in the thrown message","Verify MOLTBOOK_API_BASE points to the correct API environment","Use a unique agent name/description and confirm required fields","Check Moltbook API docs/version for registration contract changes"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"catch (e) { if (/Registration failed|register/.test((e as Error).message)) { /* surface server error text */ } }","preventionTips":["Validate name/description are non-empty and unique before registering","Pin MOLTBOOK_API_BASE per environment"],"tags":["moltbook","agent-registration","api-contract"],"backgroundTag":"api-registration-failed","analyzedSha":"0f1647f7491a217d43eb5ae7a480484bdf0aff3e","analyzedAt":"2026-08-27T12:09:55.020Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}