Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erro ao adicionar um label #1276

Open
1 task done
RodriguesCosta opened this issue Feb 28, 2025 · 0 comments
Open
1 task done

Erro ao adicionar um label #1276

RodriguesCosta opened this issue Feb 28, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@RodriguesCosta
Copy link

Welcome!

  • Yes, I have searched for similar issues on GitHub and found none.

What did you do?

Ao chamar o endpoint {{baseUrl}}/label/handleLabel/{{instance}} obtenho erros!

What did you expect?

Deveria ser possível adicionar o label e retornar com sucesso.

What did you observe instead of what you expected?

Esse e o erro retornado.

{
    "status": 400,
    "error": "Bad Request",
    "response": {
        "message": [
            "Unable to add label to chat",
            "PrismaClientKnownRequestError: \nInvalid `prisma.$executeRawUnsafe()` invocation:\n\n\nRaw query failed. Code: `42P10`. Message: `ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification`"
        ]
    }
}

Screenshots/Videos

No response

Which version of the API are you using?

2.2.3

What is your environment?

Linux

Other environment specifications

No response

If applicable, paste the log output

No response

Additional Notes

ao analisar o código percebi que o problema e que no schema prisma do postgresql não temos um index único usando instanceId, remoteJid porem no schema do mysql ele existe, com isso adicionei esse index.

  @@unique([instanceId, remoteJid])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant