@nclabs/nestjs-rpc-module
Advanced tools
Comparing version 0.1.31 to 0.1.32
@@ -57,3 +57,3 @@ "use strict"; | ||
_axiosErrorHandler(error) { | ||
const contentType = error.response.headers['content-type']; | ||
const contentType = error?.response?.headers['content-type'] || ''; | ||
const message = contentType.includes('text/html') | ||
@@ -78,3 +78,6 @@ ? this._htmlToText(error.response.data) | ||
const textBody = body.replace(/<[^>]+>/g, ''); | ||
return textBody; | ||
return { | ||
instanceof: 'HtmlError', | ||
body: textBody, | ||
}; | ||
} | ||
@@ -81,0 +84,0 @@ /** |
{ | ||
"name": "@nclabs/nestjs-rpc-module", | ||
"version": "0.1.31", | ||
"version": "0.1.32", | ||
"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
438801
3604