Improve error handling

This commit is contained in:
tdurieux
2026-05-06 18:43:36 +03:00
parent aae6eae6eb
commit da78708b7b
16 changed files with 360 additions and 49 deletions
+4 -1
View File
@@ -170,7 +170,10 @@ export class GitHubRepository {
ghRes.data.encoding as BufferEncoding
).toString("utf-8");
selected.readme = readme;
await model.save();
await RepositoryModel.updateOne(
{ externalId: this.id, "branches.name": opt.branch },
{ $set: { "branches.$.readme": readme } }
).exec();
} catch (error) {
throw new AnonymousError("readme_not_available", {
httpStatus: 404,