Skip to content

Commit c71c97d

Browse files
Incorrect error messages. Fixes #178
1 parent 70c80a0 commit c71c97d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/services/SubmissionService.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,12 @@ function * createSubmission (authUser, files, entity, span) {
315315
try {
316316
logger.info('Creating a new submission')
317317
if (files && entity.url) {
318-
logger.info('Cannot create submission. Neither file nor url to upload has been passed')
319-
throw new errors.HttpStatusError(400, `Either file to be uploaded or URL should be present`)
318+
logger.info('Cannot create submission. Ambiguous parameters. Both file and url have been provided. Unsure which to use')
319+
throw new errors.HttpStatusError(400, `Either file to be uploaded or URL should be present. Not both.`)
320320
}
321321

322322
if (!files && !entity.url) {
323-
logger.info('Cannot create submission. Ambiguous parameters. Both file and url have been provided. Unsure which to use')
323+
logger.info('Cannot create submission. Neither file nor url to upload has been passed')
324324
throw new errors.HttpStatusError(400, `Either file to be uploaded or URL should be present`)
325325
}
326326

0 commit comments

Comments
 (0)