Skip to content

Commit 4f649c4

Browse files
committed
Don't log fetch-failures for API specs
Almost certainly means a network issue, not at all interesting.
1 parent 2eafba4 commit 4f649c4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/model/api/api-store.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ export class ApiStore {
167167
publicApiCache[specId] = fetchApiMetadata(specId)
168168
.then(buildApiMetadataAsync)
169169
.catch((e) => {
170+
if (e.message === 'Failed to fetch') {
171+
// This is a network error, not a spec error. Don't log it.
172+
console.warn('Failed to fetch API spec', specId, e);
173+
throw e;
174+
}
175+
170176
console.log(`Failed to build API ${specId}`);
171177
logError(e, {
172178
apiSpecId: specId

0 commit comments

Comments
 (0)