@@ -339,7 +339,7 @@ export class AzureBlobStoragePublish implements PublisherBase {
|
||||
res.send(fileContent);
|
||||
})
|
||||
.catch(e => {
|
||||
this.logger.error(
|
||||
this.logger.warn(
|
||||
`TechDocs Azure router failed to serve content from container ${this.containerName} at path ${filePath}: ${e.message}`,
|
||||
);
|
||||
res.status(404).send('File Not Found');
|
||||
|
||||
@@ -261,7 +261,7 @@ export class GoogleGCSPublish implements PublisherBase {
|
||||
res.writeHead(200, responseHeaders);
|
||||
})
|
||||
.on('error', err => {
|
||||
this.logger.error(
|
||||
this.logger.warn(
|
||||
`TechDocs Google GCS router failed to serve content from bucket ${this.bucketName} at path ${filePath}: ${err.message}`,
|
||||
);
|
||||
// Send a 404 with a meaningful message if possible.
|
||||
|
||||
@@ -245,13 +245,13 @@ export class OpenStackSwiftPublish implements PublisherBase {
|
||||
|
||||
res.send(await streamToBuffer(stream));
|
||||
} catch (err) {
|
||||
this.logger.error(
|
||||
this.logger.warn(
|
||||
`TechDocs OpenStack swift router failed to serve content from container ${this.containerName} at path ${filePath}: ${err.message}`,
|
||||
);
|
||||
res.status(404).send('File Not Found');
|
||||
}
|
||||
} else {
|
||||
this.logger.error(
|
||||
this.logger.warn(
|
||||
`TechDocs OpenStack swift router failed to serve content from container ${this.containerName} at path ${filePath}: Not found`,
|
||||
);
|
||||
res.status(404).send('File Not Found');
|
||||
|
||||
Reference in New Issue
Block a user