response_engine

4.0.0 • Public • Published

Installation

package.json

{
    "dependencies": {
        "error_engine":"*"
    }
}

$ npm install

Configuration

## edit your error_dictionary file to add your errors, list all of your errors 
in assa array,keep the code is the key will be use to search for an error 
in the array
```js
{
    "errors": [        
        {
            "code": "1500",
            "developer_message": "we have some technical difficulties at this moment. sorry for the inconvenience",
            "more_details":"no more details you should know about",
            "user_message": [
                {
                    "lanagauge_code": 1,
                    "lanagauge_name": "Arabic",
                    "message": "لدينا بعض الصعوبات التقنية في هذه اللحظة . نأسف للإزعاج"

                },
                {
                    "lanagauge_code": 2,
                    "lanagauge_name": "English",
                    "message": "we have some technical difficulties at this moment. sorry for the inconvenience"
                }
            ]
        }
    ]
}

use it

var error_engine = require('error_engine');
error_engine.get_error_by_code("KMS_0008", "");

Readme

Keywords

Package Sidebar

Install

npm i response_engine

Weekly Downloads

0

Version

4.0.0

License

ISC

Last publish

Collaborators

  • geniusescode