{"record":{"id":"9eed1b5a30a9ff31","repo":"gitroomhq/postiz-app","slug":"failed-to-create-mewe-post","errorCode":null,"errorMessage":"Failed to create MeWe post","messagePattern":"Failed to create MeWe post","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"libraries/nestjs-libraries/src/integrations/social/mewe.provider.ts","lineNumber":280,"sourceCode":"    const postUrl =\n      postType === 'timeline'\n        ? `${this.meweHost}/api/dev/me/post`\n        : `${this.meweHost}/api/dev/group/${groupId}/post`;\n\n    // MeWe post endpoint may return 204 (no content), so use raw fetch\n    const postResponse = await fetch(postUrl, {\n      method: 'POST',\n      headers: this.authHeaders(accessToken),\n      body: JSON.stringify(postBody),\n    });\n\n    if (!postResponse.ok) {\n      const errorText = await postResponse.text();\n      const handleError = this.handleErrors(errorText);\n      if (handleError) {\n        throw new Error(handleError.value);\n      }\n      throw new Error('Failed to create MeWe post');\n    }\n\n    const postId = makeId(12);\n\n    const releaseURL = postType === 'timeline' ? `https://mewe.com/${integration.profile}/posts` : `https://mewe.com/group/${firstPost.settings.group}`;\n\n    return [\n      {\n        id: firstPost.id,\n        postId,\n        releaseURL,\n        status: 'success',\n      },\n    ];\n  }\n}\n","sourceCodeStart":262,"sourceCodeEnd":297,"githubUrl":"https://github.com/gitroomhq/postiz-app/blob/0f1647f7491a217d43eb5ae7a480484bdf0aff3e/libraries/nestjs-libraries/src/integrations/social/mewe.provider.ts#L262-L297","documentation":"MeWe post creation returned a non-ok response whose body did not match any known error pattern in handleErrors, so a generic 'Failed to create MeWe post' is thrown. The raw response is in errorText but not surfaced.","triggerScenarios":"POST to MeWe's post endpoint returns non-2xx with an unrecognized body (HTML error page, changed API contract, unexpected status code).","commonSituations":"MeWe private API changed shape, server-side 5xx, CSRF token missing/expired, or payload MeWe rejects silently.","solutions":["Log/reproduce the request and inspect the raw response body (errorText) to identify the cause","Re-authenticate the MeWe integration (CSRF/session cookies)","Check whether MeWe changed its private API — update headers/payload accordingly","Retry once for transient 5xx responses"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"catch (e) { if ((e as Error).message === 'Failed to create MeWe post') { logRawResponseForDiagnosis(); await reconnectMewe(); } }","preventionTips":["Log the raw MeWe response for unknown failures","Re-authenticate before retrying unknown post errors"],"tags":["mewe","post-creation","unofficial-api"],"backgroundTag":"social-post-rejected","analyzedSha":"0f1647f7491a217d43eb5ae7a480484bdf0aff3e","analyzedAt":"2026-08-27T12:09:55.020Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}