hookstore-error
Advanced tools
Comparing version 0.1.3 to 0.2.0
{ | ||
"name": "hookstore-error", | ||
"version": "0.1.3", | ||
"version": "0.2.0", | ||
"description": "simple error handler middleware for hookstore", | ||
@@ -11,3 +11,3 @@ "main": "lib/index.js", | ||
"@babel/runtime": "^7.0.0", | ||
"hookstore": "^0.1.6" | ||
"hookstore": "^0.2.0" | ||
}, | ||
@@ -37,3 +37,3 @@ "keywords": [ | ||
"license": "MIT", | ||
"gitHead": "19dda90efbf416872b77bc8be31ec309fd3fe162" | ||
"gitHead": "cee440d63147d06d56240829dc41e9a5238420fc" | ||
} |
@@ -25,3 +25,3 @@ # hookstore-error | ||
const model = { | ||
namespace: 'foo', | ||
name: 'foo', | ||
state: {}, | ||
@@ -53,5 +53,5 @@ actions: {}, | ||
function handleError(err) { | ||
const { namespace, action, state } = this.ctx; | ||
const { name, action, state } = this.ctx; | ||
console.error(`${namespace}/${action} error`, err); | ||
console.error(`${name}/${action} error`, err); | ||
} | ||
@@ -58,0 +58,0 @@ |
@@ -14,3 +14,3 @@ import { Context, Next, Middleware } from 'hookstore'; | ||
} catch(e) { | ||
// const { namespace, action } = ctx; | ||
// const { name, action } = ctx; | ||
@@ -20,3 +20,3 @@ if (options.error) { | ||
} else { | ||
// console.error(`[hookstore-error] ${namespace}/${action}\n`, e); | ||
// console.error(`[hookstore-error] ${name}/${action}\n`, e); | ||
throw e; | ||
@@ -23,0 +23,0 @@ } |
8112
+ Addedhookstore@0.2.5(transitive)
- Removedhookstore@0.1.6(transitive)
- Removedlodash.clonedeep@4.5.0(transitive)
- Removedlodash.isequal@4.5.0(transitive)
Updatedhookstore@^0.2.0