Skip to content

Commit

Permalink
change error paths
Browse files Browse the repository at this point in the history
  • Loading branch information
meetulr committed Nov 1, 2024
1 parent 0a40b7e commit 093c5a2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function parseUserTagMemberWhere(
if (!where.firstName && !where.lastName) {
errors.push({
message: `Atleast one of firstName or lastName should be provided`,
path: ["whereUserNameInput"],
path: ["where"],
});

return {
Expand All @@ -43,7 +43,7 @@ export function parseUserTagMemberWhere(
) {
errors.push({
message: "Invalid firstName provided. It must be a string.",
path: ["whereUserTagUserNameInput"],
path: ["whereFirstName"],
});

return {
Expand All @@ -56,7 +56,7 @@ export function parseUserTagMemberWhere(
) {
errors.push({
message: "Invalid lastName provided. It must be a string.",
path: ["whereUserTagUserNameInput"],
path: ["whereLastName"],
});

return {
Expand Down
4 changes: 2 additions & 2 deletions src/utilities/userTagsPaginationUtils/parseUserTagSortedBy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export function parseUserTagSortedBy(
if (sortedBy.id !== "DESCENDING" && sortedBy.id !== "ASCENDING") {
errors.push({
message:
"Invalid sortedByInput provided. It must be a of type SortedByOrder.",
path: ["sortUserTagInput"],
"Invalid sortedById provided. It must be a of type SortedByOrder.",
path: ["sortedById"],
});

return {
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/userTagsPaginationUtils/parseUserTagWhere.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function parseUserTagWhere(
if (typeof where.name.starts_with !== "string") {
errors.push({
message: "Invalid name provided. It must be a string.",
path: ["whereUserTagNameInput"],
path: ["whereName"],
});

return {
Expand Down

0 comments on commit 093c5a2

Please sign in to comment.