Skip to content

Commit adf1d7e

Browse files
authored
Add incorrect version number as possible cause for remote lookup failure (#67)
1 parent 8587aa7 commit adf1d7e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/rdf/PrefetchedDocumentLoader.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class PrefetchedDocumentLoader extends FetchDocumentLoader {
4848

4949
// Warn before doing a remote context lookup
5050
if (this.logger) {
51-
this.logger.warn(`Detected remote context lookup for '${url}'${this.path ? ` in ${this.path}` : ''}. This may indicate a missing or invalid dependency, or an invalid context URL.`);
51+
this.logger.warn(`Detected remote context lookup for '${url}'${this.path ? ` in ${this.path}` : ''}. This may indicate a missing or invalid dependency, incorrect version number, or an invalid context URL.`);
5252
}
5353
return super.load(url);
5454
}

test/unit/rdf/PrefetchedDocumentLoader-test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ describe('PrefetchedDocumentLoader', () => {
7878
});
7979
expect(await loader.load('http://remote.org/context'))
8080
.toEqual({ x: 'y' });
81-
expect(logger.warn).toHaveBeenCalledWith(`Detected remote context lookup for 'http://remote.org/context' in PATH. This may indicate a missing or invalid dependency, or an invalid context URL.`);
81+
expect(logger.warn).toHaveBeenCalledWith(`Detected remote context lookup for 'http://remote.org/context' in PATH. This may indicate a missing or invalid dependency, incorrect version number, or an invalid context URL.`);
8282
});
8383

8484
it('for a non-prefetched context with a logger without path', async() => {
@@ -91,7 +91,7 @@ describe('PrefetchedDocumentLoader', () => {
9191
});
9292
expect(await loader.load('http://remote.org/context'))
9393
.toEqual({ x: 'y' });
94-
expect(logger.warn).toHaveBeenCalledWith(`Detected remote context lookup for 'http://remote.org/context'. This may indicate a missing or invalid dependency, or an invalid context URL.`);
94+
expect(logger.warn).toHaveBeenCalledWith(`Detected remote context lookup for 'http://remote.org/context'. This may indicate a missing or invalid dependency, incorrect version number, or an invalid context URL.`);
9595
});
9696
});
9797
});

0 commit comments

Comments
 (0)