Open
Description
A quick explanation:
var debug = require('debug')('http');
const error = new Error('hi');
error.info= { display: 'me' };
debug(error) ;
debug('', error); // this will output info object
This is not mentioned in the readme and I had to hunt the reason for this. If an error is the first argument, it will be coerced.
Line 82 in f66cb2d
At the very least, this behavior should be documented in the readme.
An option could be added to change this behavior. At first, the option could default to the current behavior and then the default behavior can be changed after a reasonable period.
This issue is related to #334. This open issue is also related, #711.
Metadata
Metadata
Assignees
Labels
No labels