feat: complete TASK-WP2-04 credit ledger
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
export type CreditErrorCode =
|
||||
| "credit_account_not_found"
|
||||
| "credit_generation_not_found"
|
||||
| "credit_insufficient"
|
||||
| "credit_invariant_failed"
|
||||
| "credit_operation_conflict"
|
||||
| "credit_request_invalid";
|
||||
|
||||
export class CreditError extends Error {
|
||||
readonly code: CreditErrorCode;
|
||||
|
||||
constructor(code: CreditErrorCode) {
|
||||
super(code);
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user