puerto 0.14.0

Puerto — Rust full-stack DDD framework CLI. Scaffolds Clean Architecture projects with auto-wired DI, SQLx support, and zero manual wiring. Formerly puerto-framework.
1
2
3
4
5
6
7
8
9
10
11
12
13
/**
 * A request about {{ a_words }} that the API refused. `code` is the API's `ErrorResponse.name`:
 * `{{ snake }}.not_found`, `{{ snake }}.validation_error.<field>_empty`.
 */
export class {{ pascal }}Error extends Error {
  readonly code: string;

  constructor(code: string) {
    super(code);
    this.name = "{{ pascal }}Error";
    this.code = code;
  }
}