Is there a place I can see all possible error code that can come back from various APIs?
-
I'm trying to handle my game logic exclusively through cloud code.
I know the default response has 200 in it, if we are using bridges/proxies and encounter a failure within the script, should we also set the main response status to some code other than 200?Also is there a way to simulate failures for testing? IE blocked network etc. I see the docs have some of the error codes that can be found, but it doesn't seem exhaustive.
As always any adivce is appreciated!
-
Note that the response status code for running a script indicates whether the script has been executed successfully or not. To return the status of the internal methods that were executed, it is usually to include them in the customized response.
The best place to debug your cloud code script is the portal script editor, which can show the stack trace of your code, also the logs you added. -
Thanks @JasonL -- just to clarify, that means that the base response status code is just whether or not the script itself was properly executed by the request, so the only exception would be like if the user wasn't authenticated or a network timeout, is that right? It doesn't account for anything like if a proxy/bridge request that was made within the script failed-- that we should include ourselves in a custom response/error field. Right?
-
There is a global list of reason codes here - https://docs.braincloudservers.com/api/appendix/reasonCodes