Skip to content

Commit b75eb0d

Browse files
authored
fix: catalog-techdoc-url-reader should hand unmodified http rc (#1376)
1 parent c7a2391 commit b75eb0d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • workspaces/ai-integrations/plugins/catalog-techdoc-url-reader-backend/src

workspaces/ai-integrations/plugins/catalog-techdoc-url-reader-backend/src/plugin.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
LoggerService,
3535
} from '@backstage/backend-plugin-api';
3636
import { Config } from '@backstage/config';
37-
import { NotFoundError } from '@backstage/errors';
37+
import { NotFoundError, NotModifiedError } from '@backstage/errors';
3838
import { Readable } from 'stream';
3939
import fs from 'fs';
4040
import platformPath from 'path';
@@ -174,6 +174,9 @@ export class ModeCatalogBridgeTechdocUrlReader implements UrlReaderService {
174174
if (response.status === 404) {
175175
throw new NotFoundError(message);
176176
}
177+
if (response.status === 304) {
178+
throw new NotModifiedError();
179+
}
177180
throw new Error(message);
178181
}
179182

0 commit comments

Comments
 (0)