Back

how to change the message displayed on the frontend when appwrite exception occurs

  • 0
  • Android
  • Flutter
  • Apple
  • Self Hosted
Ansh
22 Sep, 2023, 14:26

i want to change the message which comes on my forntend when it no internet is available right now it shows an appwrite exception but i want it to show "connect to the net" how to implement this??

TL;DR
To change the message displayed on the frontend when an Appwrite exception occurs, you need to override the errors in your code. You can check the error type and return your own error message based on the type. For more information on error types, refer to the Appwrite documentation: <https://appwrite.io/docs/response-codes#errorTypes>. To change the message for "no internet available" to "connect to the net", you will need to check the error string and returned value in your code. Then, display the desired error message on the frontend for the end-user.
Binyamin
22 Sep, 2023, 14:28

For that you'll need to override the errors. Meaning check the error string and returned value in your code and display the error you like in the frontend for the end-user

Drake
22 Sep, 2023, 18:16

it's probably best check the error type when it's available and return your own error message basedo n the type. For more info, see https://appwrite.io/docs/response-codes#errorTypes

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