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

MrSwitch / dare / #72

06 Jun 2026 07:58PM UTC coverage: 69.143% (-30.9%) from 100.0%
#72

push

web-flow
feat(import-engine): move engines out to their own import path, BREAKING CHANGE (#454)

* feat(postgres): move postgres out to it's own endpoint, BREAKING CHANGE

* style(prettier): fix

* style(ts): fix

* test: fixes

* docs: update README

* docs: update README

* fix(import): migrate LIKE keyword to configurable prop

* feat(import): define mysql5.7 (incl 5.6) legacy import paths, #455

* fix(import): test using wrong dependency

* feat: pluggable json formatter

* fix: issue

* chore: address comments

* fix: issue

* fix: address comments

* fix: address comments, tidy ts

* feat(import): abstract json perfix, operator and formatting

* chore: tidy

* fix(import): abstract DML changes

* feat(import): abstract applyAliasesOnUpdate

* feat(import): abstract sql_fulltext_wildcard

* feat(import): abstract sql_fulltext_wildcard

* feat(import): abstract fulltext sign operators

* chore(postgres): migrate to postgres16 for future proofing

* docs(README): add info about engine specific import paths

* Update README.md

* docs(README): update

* fix: address comments

* fix: prettier

339 of 499 branches covered (67.94%)

Branch coverage included in aggregate %.

487 of 516 new or added lines in 6 files covered. (94.38%)

1497 existing lines in 23 files now uncovered.

3439 of 4965 relevant lines covered (69.26%)

4.28 hits per line

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

83.33
/src/utils/error.js
1
/* eslint sort-keys: "error"*/
9✔
2

9✔
3
const SQL_ERROR_DICTIONARY = {
9✔
4
        ER_DUP_ENTRY: 'Duplicate entry',
9✔
5
        ER_NO_DEFAULT_FOR_FIELD: 'Missing field',
9✔
6
        INVALID_IMPLEMENTATION: 'Invalid implementation',
9✔
7
        INVALID_REQUEST: 'Invalid request',
9✔
8
        INVALID_SETUP: 'Invalid setup',
9✔
9
        NOT_FOUND: 'Could not find any results matching the query',
9✔
10
};
9✔
11

9✔
12
const SQL_ERROR_STATUSCODES = {
9✔
13
        ER_DUP_ENTRY: 409,
9✔
14
        ER_NO_DEFAULT_FOR_FIELD: 400,
9✔
15
        INVALID_IMPLEMENTATION: 0,
9✔
16
        INVALID_LIMIT: 400,
9✔
17
        INVALID_REFERENCE: 400,
9✔
18
        INVALID_REQUEST: 400,
9✔
19
        INVALID_START: 400,
9✔
20
        INVALID_VALUE: 400,
9✔
21
        NOT_FOUND: 404,
9✔
22
};
9✔
23

9✔
24
class DareError extends Error {
9✔
25
        constructor(code, message) {
9✔
UNCOV
26
                super();
×
UNCOV
27
                this.code = code;
×
UNCOV
28
                this.status = SQL_ERROR_STATUSCODES[code] || 500;
×
UNCOV
29
                this.message =
×
UNCOV
30
                        message ||
×
UNCOV
31
                        SQL_ERROR_DICTIONARY[code] ||
×
UNCOV
32
                        SQL_ERROR_DICTIONARY.INVALID_REQUEST;
×
UNCOV
33
        }
×
34
}
9✔
35

9✔
36
DareError.ER_DUP_ENTRY = 'ER_DUP_ENTRY';
9✔
37
DareError.ER_NO_DEFAULT_FOR_FIELD = 'ER_NO_DEFAULT_FOR_FIELD';
9✔
38
DareError.INVALID_IMPLEMENTATION = 'INVALID_IMPLEMENTATION';
9✔
39
DareError.INVALID_LIMIT = 'INVALID_LIMIT';
9✔
40
DareError.INVALID_REFERENCE = 'INVALID_REFERENCE';
9✔
41
DareError.INVALID_REQUEST = 'INVALID_REQUEST';
9✔
42
DareError.INVALID_SETUP = 'INVALID_SETUP';
9✔
43
DareError.INVALID_START = 'INVALID_START';
9✔
44
DareError.INVALID_VALUE = 'INVALID_VALUE';
9✔
45
DareError.NOT_FOUND = 'NOT_FOUND';
9✔
46

9✔
47
export default DareError;
9✔
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