#
Services
In this crate, we've - for the moment - only implemented an error handling system.
#
Errors
In order for us (and you) to create easily more errors types that you can use in your app, we've created a RustSaaSError
enum that contains all the errors types we needed for the moment. We've added the implementations that Actix needed to
be able to use the errors that are in the enum.
#
Use the error system
The error system can be used as any other possible error.
#
Add new errors
Nothing is simpler than adding new errors! All you have to do is:
- Add the error to the
RustSaaSError
enum, with a parameter if you'd like so. - Add the
from(rustsaas_problem: RustSaaSError)
function, with the description, title, status, etc. you want.
Here you go!