gitroomhq/postiz-app · error · Error

Registration failed

Error message

Registration failed

What it means

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.

Source

Thrown at libraries/nestjs-libraries/src/integrations/social/moltbook.provider.ts:56

  async generateAuthUrl() {
    const state = makeId(6);
    return {
      url: state,
      codeVerifier: makeId(10),
      state,
    };
  }

  async registerAgent(name: string, description: string) {
    const response = await this.getSsrfSafeAxios().post(
      `${MOLTBOOK_API_BASE}/agents/register`,
      { name, description },
      { headers: { 'Content-Type': 'application/json' } }
    );

    if (!response.data.success) {
      throw new Error(response.data.error || 'Registration failed');
    }

    return response.data.agent;
  }

  async checkAgentStatus(apiKey: string) {
    const response = await this.getSsrfSafeAxios().get(
      `${MOLTBOOK_API_BASE}/agents/status`,
      {
        headers: { Authorization: `Bearer ${apiKey}` },
      }
    );

    return response.data;
  }

  async getAgentProfile(apiKey: string) {
    const response = await this.getSsrfSafeAxios().get(

View on GitHub (pinned to 0f1647f749)

Solutions

  1. Read response.data.error in the thrown message
  2. Verify MOLTBOOK_API_BASE points to the correct API environment
  3. Use a unique agent name/description and confirm required fields
  4. Check Moltbook API docs/version for registration contract changes
Defensive patterns

Strategy: try-catch

Try / catch

catch (e) { if (/Registration failed|register/.test((e as Error).message)) { /* surface server error text */ } }

Prevention

When it happens

Trigger: Agent registration payload (name/description) rejected — duplicate agent name, invalid fields, or MOLTBOOK_API_BASE pointing at the wrong environment.

Common situations: Misconfigured MOLTBOOK_API_BASE env var, re-registering an existing agent name, Moltbook API schema change, or missing required fields.

Related errors


AI-assisted analysis of gitroomhq/postiz-app@0f1647f749 (2026-08-27). Data as JSON: /api/errors/0bb86bb8ea972200. Report an issue: GitHub.