also looking at this
feat: observe verified metadata before persistence
#1
8 files
+807
-21
| @@ -10,6 +10,16 @@ export class PersistError extends Error {} | ||
| 10 | 10 | // looking from the perspective of users of metadata API or ngclient. |
| 11 | 11 | export class RepositoryError extends Error {} |
| 12 | 12 | |
| 13 | export class MetadataVerificationError extends Error { | |
| 14 | constructor( | |
| 15 | readonly role: string, | |
| 16 | message: string, | |
| 17 | options?: ErrorOptions | |
| 18 | ) { | |
| 19 | super(message, options); | |
| 20 | } | |
| 21 | } | |
| 22 | ||
| 13 | 23 | // An error for metadata that contains an invalid version number. |
| 14 | 24 | export class BadVersionError extends RepositoryError {} |
| 15 | 25 | |