nuxt-testevia
Advanced tools
Comparing version 1.0.9 to 1.1.0
{ | ||
"name": "nuxt-testevia", | ||
"version": "1.0.9", | ||
"version": "1.1.0", | ||
"description": "Nuxt - Testevia Logger", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -47,20 +47,22 @@ import axios from 'axios' | ||
if(err['code']) context.data['code'] = err['code']; | ||
if(err.stack) { | ||
let stack = ''; | ||
if(urls) stack = '\nUrls: ' + urls.reverse().join('\n') + '\n'; | ||
stack += '\nStack: ' + err.stack | ||
context.data['stacktrace'] = stack; | ||
} | ||
for(let key in err){ | ||
context.data[key] = err[key] | ||
} | ||
if(process.browser){ | ||
let stack = '\n'; | ||
if(urls) stack = 'Urls: ' + urls.reverse().join('\n') + '\n'; | ||
if(!process.server){ | ||
stack += '\nClient side\n' | ||
try{ | ||
context.data['browser'] = whichBrowser() + ' - OS: ' + whichOS(); | ||
} catch(e){ | ||
} | ||
} else { | ||
stack += '\nServer side\n' | ||
} | ||
if(err.stack) { | ||
stack += '\nStack: ' + err.stack | ||
} | ||
context.data['stacktrace'] = stack; | ||
axios.post('https://testevia.broj42.com/api/log-errors/', context, {headers: {'Authorization': options.apiKey}}) | ||
@@ -67,0 +69,0 @@ .catch(function(e){ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3908