error_mapper 0.4.0

Simple and standardized Results and Errors handling accross all your projects
Documentation
1
2
3
4
5
6
7
8
9
10
11

use crate::{SystemErrorCodes, TheErrorType};

impl From<serde_json::Error> for TheErrorType {
    fn from(value: serde_json::Error) -> Self {
        Self {
            error_type: SystemErrorCodes::JsonError,
            error_content: value.to_string()
        }
    }
}