Skip to content

Commit

Permalink
fix: broken link in error (missing-composite-attributes)
Browse files Browse the repository at this point in the history
  • Loading branch information
iOSonntag committed Jul 22, 2024
1 parent 7de5b06 commit 168ea27
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 101 deletions.
2 changes: 1 addition & 1 deletion src/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ const ErrorCodes = {
},
IncompleteCompositeAttributes: {
code: 2002,
section: "incomplete-composite-attributes",
section: "missing-composite-attributes",
name: "IncompleteCompositeAttributes",
sym: ErrorCode,
},
Expand Down
2 changes: 1 addition & 1 deletion test/connected.batch.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ describe("BatchGet", () => {
expect(() =>
MallStores.get([record1, record2, record3, {}]).params(),
).to.throw(
'Incomplete or invalid key composite attributes supplied. Missing properties: "sector" - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#incomplete-composite-attributes',
'Incomplete or invalid key composite attributes supplied. Missing properties: "sector" - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#missing-composite-attributes',
);
});
it("Should create params", () => {
Expand Down
4 changes: 2 additions & 2 deletions test/connected.crud.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4314,7 +4314,7 @@ for (const [clientVersion, client] of [
} catch (err) {
expect(err).to.not.be.null;
expect(err.message).to.equal(
`Incomplete composite attributes: Without the composite attributes "prop7", "prop8" the following access patterns cannot be updated: "index3". If a composite attribute is readOnly and cannot be set, use the 'composite' chain method on update to supply the value for key formatting purposes. - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#incomplete-composite-attributes`,
`Incomplete composite attributes: Without the composite attributes "prop7", "prop8" the following access patterns cannot be updated: "index3". If a composite attribute is readOnly and cannot be set, use the 'composite' chain method on update to supply the value for key formatting purposes. - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#missing-composite-attributes`,
);
}
});
Expand All @@ -4328,7 +4328,7 @@ for (const [clientVersion, client] of [
} catch (err) {
expect(err).to.not.be.null;
expect(err.message).to.equal(
`Incomplete composite attributes: Without the composite attributes "prop7", "prop8" the following access patterns cannot be updated: "index3". If a composite attribute is readOnly and cannot be set, use the 'composite' chain method on update to supply the value for key formatting purposes. - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#incomplete-composite-attributes`,
`Incomplete composite attributes: Without the composite attributes "prop7", "prop8" the following access patterns cannot be updated: "index3". If a composite attribute is readOnly and cannot be set, use the 'composite' chain method on update to supply the value for key formatting purposes. - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#missing-composite-attributes`,
);
}
});
Expand Down
6 changes: 3 additions & 3 deletions test/connected.page.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ describe("Query Pagination", () => {
// page: {task: "1234", project: undefined}
// },
// output: {
// error: 'Incomplete or invalid key composite attributes supplied. Missing properties: "project" - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#incomplete-composite-attributes'
// error: 'Incomplete or invalid key composite attributes supplied. Missing properties: "project" - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#missing-composite-attributes'
// },
// }, {
// type: "query",
Expand All @@ -748,15 +748,15 @@ describe("Query Pagination", () => {
// page: {task: "1234", project: "anc"}
// },
// output: {
// error: 'Incomplete or invalid key composite attributes supplied. Missing properties: "employee" - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#incomplete-composite-attributes'
// error: 'Incomplete or invalid key composite attributes supplied. Missing properties: "employee" - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#missing-composite-attributes'
// },
// }, {
// type: "scan",
// input: {
// page: {task: "1234", project: undefined}
// },
// output: {
// error: 'Incomplete or invalid key composite attributes supplied. Missing properties: "project", "employee" - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#incomplete-composite-attributes'
// error: 'Incomplete or invalid key composite attributes supplied. Missing properties: "project", "employee" - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#missing-composite-attributes'
// },
// }
// ];
Expand Down
4 changes: 2 additions & 2 deletions test/connected.update.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2027,7 +2027,7 @@ describe("Update Item", () => {
users.update({ username }).remove(["device"]).params();

expect(error).to.throw(
`Incomplete composite attributes: Without the composite attributes "location" the following access patterns cannot be updated: "approved". If a composite attribute is readOnly and cannot be set, use the 'composite' chain method on update to supply the value for key formatting purposes. - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#incomplete-composite-attributes`,
`Incomplete composite attributes: Without the composite attributes "location" the following access patterns cannot be updated: "approved". If a composite attribute is readOnly and cannot be set, use the 'composite' chain method on update to supply the value for key formatting purposes. - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#missing-composite-attributes`,
);

const error2 = await users
Expand All @@ -2036,7 +2036,7 @@ describe("Update Item", () => {
.go()
.catch((err) => err);
expect(error2.message).to.equal(
`Incomplete composite attributes: Without the composite attributes "device" the following access patterns cannot be updated: "approved". If a composite attribute is readOnly and cannot be set, use the 'composite' chain method on update to supply the value for key formatting purposes. - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#incomplete-composite-attributes`,
`Incomplete composite attributes: Without the composite attributes "device" the following access patterns cannot be updated: "approved". If a composite attribute is readOnly and cannot be set, use the 'composite' chain method on update to supply the value for key formatting purposes. - For more detail on this error reference: https://electrodb.dev/en/reference/errors/#missing-composite-attributes`,
);
});

Expand Down
Loading

0 comments on commit 168ea27

Please sign in to comment.