Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance error handling when publishing a HIT #46

Open
jorgeramirez opened this issue Apr 6, 2018 · 0 comments
Open

Enhance error handling when publishing a HIT #46

jorgeramirez opened this issue Apr 6, 2018 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jorgeramirez
Copy link
Member

jorgeramirez commented Apr 6, 2018

Check the following errors so that we can send the corresponding error message to the frontend.

AccessDeniedException

{ AccessDeniedException: User: arn:aws:iam::637298523374:user/crowdai is not authorized to perform: mechanicalturk:CreateHIT
2018-04-06T17:42:14.849350+00:00 app[web.1]:     at Request.extractError (/app/node_modules/aws-sdk/lib/protocol/json.js:48:27)
2018-04-06T17:42:14.849352+00:00 app[web.1]:     at Request.callListeners (/app/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
2018-04-06T17:42:14.849353+00:00 app[web.1]:     at Request.emit (/app/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
2018-04-06T17:42:14.849356+00:00 app[web.1]:     at Request.emit (/app/node_modules/aws-sdk/lib/request.js:683:14)
2018-04-06T17:42:14.849357+00:00 app[web.1]:     at Request.transition (/app/node_modules/aws-sdk/lib/request.js:22:10)
2018-04-06T17:42:14.849359+00:00 app[web.1]:     at AcceptorStateMachine.runTo (/app/node_modules/aws-sdk/lib/state_machine.js:14:12)
2018-04-06T17:42:14.849361+00:00 app[web.1]:     at /app/node_modules/aws-sdk/lib/state_machine.js:26:10
2018-04-06T17:42:14.849362+00:00 app[web.1]:     at Request.<anonymous> (/app/node_modules/aws-sdk/lib/request.js:38:9)
2018-04-06T17:42:14.849364+00:00 app[web.1]:     at Request.<anonymous> (/app/node_modules/aws-sdk/lib/request.js:685:12)
2018-04-06T17:42:14.849366+00:00 app[web.1]:     at Request.callListeners (/app/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
2018-04-06T17:42:14.849368+00:00 app[web.1]:   message: 'User: arn:aws:iam::637298523374:user/crowdai is not authorized to perform: mechanicalturk:CreateHIT',
2018-04-06T17:42:14.849370+00:00 app[web.1]:   code: 'AccessDeniedException',
2018-04-06T17:42:14.849372+00:00 app[web.1]:   time: 2018-04-06T17:42:14.845Z,
2018-04-06T17:42:14.849374+00:00 app[web.1]:   requestId: 'ac9b8278-9e99-4ded-96b5-98528c098810',
2018-04-06T17:42:14.849375+00:00 app[web.1]:   statusCode: 400,
2018-04-06T17:42:14.849377+00:00 app[web.1]:   retryable: false,
2018-04-06T17:42:14.849379+00:00 app[web.1]:   retryDelay: 52.280048917572095 }

RequestError

{ RequestError: To use the MTurk API, you will need an Amazon Web Services (AWS) Account. Your AWS account must be linked to your Amazon Mechanical Turk Account. Visit https://requester.mturk.com/developer to get started.
2018-04-06T18:53:58.182646+00:00 app[web.1]:     at Request.extractError (/app/node_modules/aws-sdk/lib/protocol/json.js:48:27)
2018-04-06T18:53:58.182648+00:00 app[web.1]:     at Request.callListeners (/app/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
2018-04-06T18:53:58.182650+00:00 app[web.1]:     at Request.emit (/app/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
2018-04-06T18:53:58.182652+00:00 app[web.1]:     at Request.emit (/app/node_modules/aws-sdk/lib/request.js:683:14)
2018-04-06T18:53:58.182654+00:00 app[web.1]:     at Request.transition (/app/node_modules/aws-sdk/lib/request.js:22:10)
2018-04-06T18:53:58.182655+00:00 app[web.1]:     at AcceptorStateMachine.runTo (/app/node_modules/aws-sdk/lib/state_machine.js:14:12)
2018-04-06T18:53:58.182657+00:00 app[web.1]:     at /app/node_modules/aws-sdk/lib/state_machine.js:26:10
2018-04-06T18:53:58.182659+00:00 app[web.1]:     at Request.<anonymous> (/app/node_modules/aws-sdk/lib/request.js:38:9)
2018-04-06T18:53:58.182661+00:00 app[web.1]:     at Request.<anonymous> (/app/node_modules/aws-sdk/lib/request.js:685:12)
2018-04-06T18:53:58.182663+00:00 app[web.1]:     at Request.callListeners (/app/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
2018-04-06T18:53:58.182664+00:00 app[web.1]:   message: 'To use the MTurk API, you will need an Amazon Web Services (AWS) Account. Your AWS account must be linked to your Amazon Mechanical Turk Account. Visit https://requester.mturk.com/developer to get started.',
2018-04-06T18:53:58.182666+00:00 app[web.1]:   code: 'RequestError',
2018-04-06T18:53:58.182668+00:00 app[web.1]:   time: 2018-04-06T18:53:58.179Z,
2018-04-06T18:53:58.182670+00:00 app[web.1]:   requestId: '0d01847e-e886-4d

RequestError

{ RequestError: This Requester has insufficient funds in their account to complete this transaction. Please visit https://requester.mturk.com/prepayments/new to purchase Prepaid HITs. (1523041500385)
2018-04-06T19:05:00.367668+00:00 app[web.1]:     at Request.extractError (/app/node_modules/aws-sdk/lib/protocol/json.js:48:27)
2018-04-06T19:05:00.367670+00:00 app[web.1]:     at Request.callListeners (/app/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
2018-04-06T19:05:00.367671+00:00 app[web.1]:     at Request.emit (/app/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
2018-04-06T19:05:00.367673+00:00 app[web.1]:     at Request.emit (/app/node_modules/aws-sdk/lib/request.js:683:14)
2018-04-06T19:05:00.367675+00:00 app[web.1]:     at Request.transition (/app/node_modules/aws-sdk/lib/request.js:22:10)
2018-04-06T19:05:00.367677+00:00 app[web.1]:     at AcceptorStateMachine.runTo (/app/node_modules/aws-sdk/lib/state_machine.js:14:12)
2018-04-06T19:05:00.367679+00:00 app[web.1]:     at /app/node_modules/aws-sdk/lib/state_machine.js:26:10
2018-04-06T19:05:00.367680+00:00 app[web.1]:     at Request.<anonymous> (/app/node_modules/aws-sdk/lib/request.js:38:9)
2018-04-06T19:05:00.367682+00:00 app[web.1]:     at Request.<anonymous> (/app/node_modules/aws-sdk/lib/request.js:685:12)
2018-04-06T19:05:00.367684+00:00 app[web.1]:     at Request.callListeners (/app/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
2018-04-06T19:05:00.367685+00:00 app[web.1]:   message: 'This Requester has insufficient funds in their account to complete this transaction. Please visit https://requester.mturk.com/prepayments/new to purchase Prepaid HITs. (1523041500385)',
2018-04-06T19:05:00.367687+00:00 app[web.1]:   code: 'RequestError',
2018-04-06T19:05:00.367689+00:00 app[web.1]:   time: 2018-04-06T19:05:00.366Z,
2018-04-06T19:05:00.367691+00:00 app[web.1]:   requestId: 'e32bd760-c71e-4e3b-9c20-04c18b68dfd4',
2018-04-06T19:05:00.367693+00:00 app[web.1]:   statusCode: 400,
2018-04-06T19:05:00.367694+00:00 app[web.1]:   retryable: false,
2018-04-06T19:05:00.367696+00:00 app[web.1]:   retryDelay: 58.36158143271288 }
@jorgeramirez jorgeramirez self-assigned this Apr 6, 2018
@jorgeramirez jorgeramirez added the enhancement New feature or request label Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant