Menu

#1705 [BUG] error 500 when setting attribute

open
nobody
bug (21)
2023-11-28
2023-11-28
Anonymous
No

Originally created by: danilofuchs
Originally owned by: mattinannt

Issue Summary

 https://app.formbricks.com/api/v1/client/clpb765qb2skzdl2i9vxh8njv/people/user_2WLtykPSntaXpZmrxA1l9o20zmT

{
  "attributes": {
    "companyId": "0e61bb89-5b34-4303-832d-c6926bfa1ee8"
  }
}

500 Internal Server Error

{
  "code": "internal_server_error",
  "message": "Unable to complete request: \nInvalid `prisma.attributeClass.create()` invocation:\n\n\nUnique constraint failed on the fields: (`name`,`environmentId`)",
  "details": {}
}

Steps to Reproduce

  1. Called await formbricks.setAttribute("companyId", companyId);

Expected behavior

Attribute to be saved

Other information

No response

Screenshots

No response

Environment

  • [X] Formbricks Cloud (app.formbricks.com)
  • [ ] Self-hosted Formbricks

Desktop (please complete the following information)

- Browser: Chrome 119
- Node: 18

Discussion

  • Anonymous

    Anonymous - 2023-11-28

    Originally posted by: danilofuchs

    Update: I archived the attribute in the Dashboard, ran the application and unarchived it, now it works.

     
  • Anonymous

    Anonymous - 2023-11-28

    Originally posted by: mattinannt

    @danilofuchs this seems like a caching issue where the attribute class isn't recognized properly. We will check on this and come up with a fix :-)

     
  • Anonymous

    Anonymous - 2023-11-28
     

Log in to post a comment.

MongoDB Logo MongoDB