Realm - List of possible error codes


#1

In Realm Object Server sample codes, following can be found:

throw new deps.problem.HttpProblem.Unauthorized({
detail: Something bad happened: ${err.toString()},
});

Here, like deps.problem.HttpProblem.Unauthorized there may be other defined errors that can be used. However, I could no where find such list or details in any docs or references.

Can anyone help me in here to get such list or errors?


#2

We haven’t really got around and documented them. But you can find the elsewhere.


#3

When I use the above mentioned code, I get following error:

error: Internal server error: ReferenceError: deps is not defined

Can you point me how can I reference deps? I could not find it in realm-object-server.


#4

@meetakshay99 You can find them all in code at this path: realm-object-server/node_modules/realm-object-server-developer/node_modules/ros-problem/dist/http_problem.js and the other *_problem.js files in that dir.

The exact path may vary depending on the way you installed ROS.