• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

WolferyScripting / resclient-ts / #13

28 Jul 2025 04:45PM UTC coverage: 51.039% (+0.3%) from 50.726%
#13

push

DonovanDMC
stricter types

187 of 240 branches covered (77.92%)

Branch coverage included in aggregate %.

239 of 290 new or added lines in 12 files covered. (82.41%)

8 existing lines in 5 files now uncovered.

1188 of 2454 relevant lines covered (48.41%)

9.96 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

16.13
/lib/models/ResError.ts
1
import { SystemErrorCodes } from "../Constants.js";
1✔
2
import Properties from "../util/Properties.js";
1✔
3
import { type ErrorData } from "../util/resgate.js";
1✔
4

1✔
5
export default class ResError extends Error {
1!
6
    code?: string;
×
7
    data?: unknown;
×
8
    method?: string;
×
9
    override name = "ResError";
×
10
    params?: unknown;
×
11
    rid!: string;
×
12
    constructor(rid: string, method?: string, params?: unknown) {
×
13
        super();
×
14
        Properties.of(this)
×
15
            .define("data", true, false, true)
×
16
            .readOnly("params", params)
×
17
            .define("code", true, true, true)
×
18
            .define("method", false, true, true, method)
×
19
            .define("message", true, true, true)
×
20
            .define("rid", false, true, true, rid);
×
21
    }
×
22

×
NEW
23
    init(err: Partial<ErrorData> & { data?: unknown; }): this {
×
NEW
24
        this.code = err.code || SystemErrorCodes.UNKNOWN;
×
25
        this.data = err.data || "Unknown Error";
×
26
        this.message = err.message ?? "Unknown Error";
×
27

×
28
        return this;
×
29
    }
×
30
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc