Skip to content
Back

Error codes

  • 0
  • React Native
  • Cloud
zombikaa
22 Mar, 2025, 12:31

Hi! Is there a way that i can somehow get an error code next to appwriteException errors? Right now i get errors like this: Error: AppwriteException: Creation of a session is prohibited when a session is active.

There is no code attached to that.

TL;DR
Developers can catch errors and throw new error text. You can add a text before each error log to identify where the error is coming from. To get an error code with AppwriteException errors, modify the code to include error codes along with the error messages.
Axistro
22 Mar, 2025, 12:34

the error will be shown from the part where you catch this error so you can add a text bfore each error log so that you can see where the error is coming from

zombikaa
22 Mar, 2025, 12:35

i know where this is coming from, i would need the code so i can write my own error messages in my language.

Axistro
22 Mar, 2025, 12:36

you can do catch error then throw a new error text ...

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more