Skip to content

Commit

Permalink
fix(adapter): Log information if request couldn't be found in recording
Browse files Browse the repository at this point in the history
These three fields are referenced in the _identify function.

Fixes #114
  • Loading branch information
Dustin Masters committed Jan 29, 2019
1 parent 9db417a commit 9663c91
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/@pollyjs/adapter/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export default class Adapter {
}

async replay(pollyRequest) {
const { config } = pollyRequest;
const { config, identifiers, id, order } = pollyRequest;
const recordingEntry = await this.persister.findEntry(pollyRequest);

if (recordingEntry) {
Expand Down Expand Up @@ -205,7 +205,8 @@ export default class Adapter {

this.assert(
'Recording for the following request is not found and `recordIfMissing` is `false`.\n' +
`${pollyRequest.method} ${pollyRequest.url}\n`,
JSON.stringify({ identifiers, id, order }, null, 2) +
'\n',
false
);
}
Expand Down

0 comments on commit 9663c91

Please sign in to comment.