Back

Generate errors from appwrite

  • 0
  • Web
Ajit Singh
20 Jul, 2023, 08:22

I want to test my application responses is there a way I can generate the errors thrown by appwrite to check how will my app respond

TL;DR
The user is looking for a way to generate errors from Appwrite in order to test their application's response. They want to create server-side error messages for certain scenarios and check if Appwrite functions are exceeding the allotted time. They also want to know if they can manually trigger errors or customize error messages. The solution suggested is to check the error types and response codes provided by Appwrite's documentation, and if necessary, create an issue on GitHub to suggest or request additional features. It is also recommended to handle errors client-side for testing application responses.
D5
20 Jul, 2023, 09:52

What do you mean?

D5
20 Jul, 2023, 09:52

That should be done client sided

D5
20 Jul, 2023, 09:53

(your app, not Appwrite)

Ajit Singh
20 Jul, 2023, 10:59

Yeah tere are various types of errors generated by various codes I have written different error messages and handled each code differently is there a way to induce errors yourself so that I can check that all of my flows works are working as required

Ajit Singh
20 Jul, 2023, 11:00

because appwrite has its own way of sending error messages

D5
20 Jul, 2023, 11:07

I think current there's not any option to customise them

D5
20 Jul, 2023, 11:12

You could check on GitHub if this has been suggested if not, create an issue, it will be appreciated

Ajit Singh
20 Jul, 2023, 11:17

ok

Ajit Singh
20 Jul, 2023, 11:19

Can I trigger errors so that I test my flows. Is there a way to manually trigger errors

D5
20 Jul, 2023, 11:56

I think not, maybe replicating what it makes the error being thrown

Ajit Singh
20 Jul, 2023, 11:57

Oka thanks

D5
20 Jul, 2023, 11:57

Here you have response codes, maybe this could be helpful? https://appwrite.io/docs/response-codes

Ajit Singh
20 Jul, 2023, 12:00

I already checked this page it defines the code and type but not the message. Like in the example argument_invalid there will be different messages for different invalid arguments. But I cant find that list of message anywhere

D5
20 Jul, 2023, 12:05

In the error types section you have the message: https://appwrite.io/docs/response-codes#errorTypes

Ajit Singh
20 Jul, 2023, 12:44

The description are the actual messages

Guille
20 Jul, 2023, 12:53

Can you give us an example of the errors you want to test?

Ajit Singh
20 Jul, 2023, 13:15

I have a phone input field where I have put the client side checks for no characters or symbols allowed. I want a server side message for it.

I saw that appwrite servers go down for 10-20 minutes 2-3 times in last month for which I want to show error messages for it. Like the service is down please check again later

When the user is not logged in I want see what is the reason and display messages I wanted to know if server side messages are in line with what I want or I should write my own messages

I also want to check if appwrite function is exceeding time that I have allotted it.

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