We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5aed458 commit fd0f699Copy full SHA for fd0f699
packages/dd-trace/test/exporters/agent/writer.spec.js
@@ -147,6 +147,23 @@ function describeWriter (protocolVersion) {
147
})
148
149
150
+ it('should log request errors', done => {
151
+ const error = new Error('boom')
152
+ error.status = 42
153
+
154
+ request.yields(error)
155
156
+ encoder.count.returns(1)
157
+ writer.flush()
158
159
+ setTimeout(() => {
160
+ expect(log.error)
161
+ .to.have.been.calledWith('Error sending payload to the agent (status code: %s)',
162
+ error.status, error, log.MUTE)
163
+ done()
164
+ })
165
166
167
it('should update sampling rates', (done) => {
168
encoder.count.returns(1)
169
writer.flush(() => {
0 commit comments