Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

submissionPhaseId must be a number #17

Closed
callmekatootie opened this issue Jun 15, 2021 · 2 comments
Closed

submissionPhaseId must be a number #17

callmekatootie opened this issue Jun 15, 2021 · 2 comments

Comments

@callmekatootie
Copy link
Collaborator

[1] "submissionPhaseId" must be a number
    at Object.exports.process (/or-review-processor/node_modules/joi/lib/errors.js:203:19)
    at internals.Object._validateWithOptions (/or-review-processor/node_modules/joi/lib/types/any/index.js:764:31)
    at module.exports.internals.Any.root.validate (/or-review-processor/node_modules/joi/lib/index.js:147:23)
    at module.exports.internals.Any.root.attempt (/or-review-processor/node_modules/joi/lib/index.js:177:29)

To reproduce, just upload a submission

Relevant message sent / received in kafka

error: Error [ValidationError]: {
  "message": {
    "topic": "submission.notification.create",
    "originator": "submission-api",
    "timestamp": "2021-06-15T05:29:42.277Z",
    "mime-type": "application/json",
    "payload": {
      "resource": "submission",
      "id": "5c6b74f4-d72b-468f-abda-689673efd0b6",
      "type": "Contest Submission",
      "url": "redacted"
      "memberId": "redacted"
      "challengeId": 30059022,
      "legacyChallengeId": 30059022,
      "created": "2021-06-15T05:29:42.277Z",
      "updated": "2021-06-15T05:29:42.277Z",
      "createdBy": "callmekatootie",
      "updatedBy": "callmekatootie",
      "fileType": "zip",
      "submittedDate": "2021-06-15T05:29:42.277Z",
      "v5ChallengeId": "a41ec123-29eb-41cc-83b9-14da9022f073",
      "isFileSubmission": false,
      "submissionPhaseId" [1]: "6950164f-3c5e-4bdc-abc8-22aaf5a1bd49"
    }
  }
}

@callmekatootie
Copy link
Collaborator Author

More errors after fixing the above:

[1] "legacyChallengeId" is not allowed
[2] "submittedDate" is not allowed
[3] "v5ChallengeId" is not allowed
    at Object.exports.process (/home/mithun/Desktop/projects/topcoder/or-review-processor/node_modules/joi/lib/errors.js:203:19)
    at internals.Object._validateWithOptions (/home/mithun/Desktop/projects/topcoder/or-review-processor/node_modules/joi/lib/types/any/index.js:764:31)

@callmekatootie
Copy link
Collaborator Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant