@nclabs/nestjs-rpc-module
Advanced tools
Comparing version 0.1.29 to 0.1.30
@@ -37,10 +37,2 @@ "use strict"; | ||
}; | ||
console.log('axiosError', axiosError); | ||
console.log(' '); | ||
console.log('nclabsError', nclabsError); | ||
console.log(' '); | ||
console.log('rpcError', rpcError); | ||
console.log(' '); | ||
console.log('emptyError', emptyError); | ||
console.log(' '); | ||
const error = axiosError || nclabsError || rpcError || emptyError || err; | ||
@@ -66,3 +58,5 @@ const { source = {} } = err || {}; | ||
const contentType = error.response.headers['content-type']; | ||
const message = contentType.includes('text/html') ? this._htmlToText(error.response.data) : error.message; | ||
const message = contentType.includes('text/html') | ||
? this._htmlToText(error.response.data) | ||
: error.response?.data?.message || error.message; | ||
return { | ||
@@ -69,0 +63,0 @@ code: error?.response?.status || 400, |
{ | ||
"name": "@nclabs/nestjs-rpc-module", | ||
"version": "0.1.29", | ||
"version": "0.1.30", | ||
"description": "Utilitário NestJS para configuração de rotas e cache em microsserviços. Utilizado especificamente para projetos nclabs", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is not supported yet
438580
3598