hicommonwealth / commonwealth

A platform for decentralized communities
https://commonwealth.im
GNU General Public License v3.0
67 stars 44 forks source link

Can't create threads from specific addresses #9106

Closed timolegros closed 2 months ago

timolegros commented 2 months ago

Description

Tried creating a thread in the tim-test community and it throws with this error:

[23:24:44.667] ERROR (utils.ts): INTERNAL_SERVER_ERROR: [ZodError] thread.createThread: [
  {
    "received": "",
    "code": "invalid_enum_value",
    "options": [
      "google",
      "github",
      "discord",
      "twitter",
      "apple",
      "email",
      "unknown"
    ],
    "path": [
      "Address",
      "wallet_sso_source"
    ],
    "message": "Invalid enum value. Expected 'google' | 'github' | 'discord' | 'twitter' | 'apple' | 'email' | 'unknown', received ''"
  }
] 

Additional context

timolegros commented 2 months ago

Error is caused by empty string value in Addresses.wallet_sso_source. Modifying Address schema to accept empty strings would fix the error.