@orbiting/backend-modules-auth
Advanced tools
Comparing version 3.0.4 to 3.0.5
@@ -1,6 +0,16 @@ | ||
<a name="3.0.4"></a> | ||
## 3.0.4 (2018-01-14) | ||
<a name="3.0.5"></a> | ||
## 3.0.5 (2018-01-14) | ||
<a name="3.0.5"></a> | ||
## 3.0.5 (2018-01-14) | ||
### Bug Fixes | ||
* **auth:** error levels ([3b166c1](https://github.com/orbiting/backend-modules/commit/3b166c1)) | ||
<a name="3.0.4"></a> | ||
@@ -7,0 +17,0 @@ ## 3.0.4 (2018-01-14) |
@@ -20,5 +20,5 @@ const { QueryEmailMismatchError, NoSessionError } = require('../../../lib/errors') | ||
if (e instanceof QueryEmailMismatchError) { | ||
console.error("authorizeSession: session.email and query.email don't match: %O", { req: req._log(), ...e.meta }) | ||
console.info("authorizeSession: session.email and query.email don't match: %O", { req: req._log(), ...e.meta }) | ||
} else if (e instanceof NoSessionError) { | ||
console.error('authorizeSession: no session %O', { req: req._log(), ...e.meta }) | ||
console.info('authorizeSession: no session %O', { req: req._log(), ...e.meta }) | ||
} else { | ||
@@ -25,0 +25,0 @@ const util = require('util') |
@@ -12,11 +12,11 @@ const { NoSessionError, QueryEmailMismatchError } = require('../../../lib/errors') | ||
if (e instanceof QueryEmailMismatchError) { | ||
console.error("unauthorizedSession: session.email and query.email don't match: %O", { req: req._log(), ...e.meta }) | ||
console.info("unauthorizedSession: session.email and query.email don't match: %O", { req: req._log(), ...e.meta }) | ||
} else if (e instanceof NoSessionError) { | ||
console.error('unauthorizedSession: no session %O', { req: req._log(), ...e.meta }) | ||
console.info('unauthorizedSession: no session %O', { req: req._log(), ...e.meta }) | ||
} else { | ||
const util = require('util') | ||
console.error('unauthorizedSession:: exception', util.inspect({ req: req._log(), emailFromQuery: email, e }, {depth: null})) | ||
console.info('unauthorizedSession:: exception', util.inspect({ req: req._log(), emailFromQuery: email, e }, {depth: null})) | ||
} | ||
throw new Error(t('api/unauthorized')) | ||
throw new Error(t('api/token/invalid')) | ||
} | ||
} |
{ | ||
"name": "@orbiting/backend-modules-auth", | ||
"version": "3.0.4", | ||
"version": "3.0.5", | ||
"description": "auth migrations, seeds, middleware, graphql schema and resolvers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
62987