mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-13 10:52:53 +00:00
fix: fix error message when file is not found
This commit is contained in:
@@ -61,6 +61,13 @@ export default class GitHubStream extends GitHubBase implements SourceBase {
|
||||
await storage.write(file.originalCachePath, content, file, this);
|
||||
return stream.Readable.from(content);
|
||||
} catch (error) {
|
||||
if (error.status == 404) {
|
||||
throw new AnonymousError("file_not_found", {
|
||||
httpStatus: error.status,
|
||||
cause: error,
|
||||
object: file,
|
||||
});
|
||||
}
|
||||
throw new AnonymousError("file_too_big", {
|
||||
httpStatus: error.status,
|
||||
cause: error,
|
||||
|
||||
Reference in New Issue
Block a user