Skip to content

Instantly share code, notes, and snippets.

@worldsoup
Created January 19, 2017 23:24
Show Gist options
  • Save worldsoup/247a2507f20572242b5a7b2a6b6fe106 to your computer and use it in GitHub Desktop.
Save worldsoup/247a2507f20572242b5a7b2a6b6fe106 to your computer and use it in GitHub Desktop.
Create, Delete
1) should create a new Todo, & delete it
Create, List, Delete
2) should create a new Todo, list it, & delete it
Create, Read, Delete
3) should create a new Todo, read it, & delete it
Create, Update, Delete
4) should create a new Todo, update it, verify the update, & delete it
0 passing (3s)
4 failing
1) Create, Delete should create a new Todo, & delete it:
Uncaught AssertionError: Create Status Code != 200 (403)
+ expected - actual
-200
+403
at Request._callback (test/createDelete.js:23:11)
at Request.self.callback (node_modules/request/request.js:186:22)
at Request.<anonymous> (node_modules/request/request.js:1081:10)
at IncomingMessage.<anonymous> (node_modules/request/request.js:1001:12)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
2) Create, List, Delete should create a new Todo, list it, & delete it:
Uncaught AssertionError: Create Status Code != 200 (403)
+ expected - actual
-200
+403
at Request._callback (test/createListDelete.js:23:11)
at Request.self.callback (node_modules/request/request.js:186:22)
at Request.<anonymous> (node_modules/request/request.js:1081:10)
at IncomingMessage.<anonymous> (node_modules/request/request.js:1001:12)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
3) Create, Read, Delete should create a new Todo, read it, & delete it:
Uncaught AssertionError: Create Status Code != 200 (403)
+ expected - actual
-200
+403
at Request._callback (test/createReadDelete.js:23:11)
at Request.self.callback (node_modules/request/request.js:186:22)
at Request.<anonymous> (node_modules/request/request.js:1081:10)
at IncomingMessage.<anonymous> (node_modules/request/request.js:1001:12)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
4) Create, Update, Delete should create a new Todo, update it, verify the update, & delete it:
Uncaught AssertionError: Create Status Code != 200 (403)
+ expected - actual
-200
+403
at Request._callback (test/createUpdateDelete.js:23:11)
at Request.self.callback (node_modules/request/request.js:186:22)
at Request.<anonymous> (node_modules/request/request.js:1081:10)
at IncomingMessage.<anonymous> (node_modules/request/request.js:1001:12)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
@nerdguru
Copy link

There's definitely something going on with certs that wasn't there before the break. On new deployments myself, I don't get 403's, but I do get a different cert error, for example:

[Uncaught Error: Create call failed: Error: unable to verify the first certificate
      at Request._callback (test/createListDelete.js:21:11)
      at self.callback (node_modules/request/request.js:186:22)
      at Request.onRequestError (node_modules/request/request.js:845:8)
      at TLSSocket.socketErrorListener (_http_client.js:310:9)
      at emitErrorNT (net.js:1276:8)
      at _combinedTickCallback (internal/process/next_tick.js:74:11)
      at process._tickCallback (internal/process/next_tick.js:98:9)](url)

I'll take a more detailed look over the weekend.

@nerdguru
Copy link

Take a look now, documentation error on my part. That exported path needs to contain the stage name, "/dev" more than likely. Without it, the test code is pinging a path that doesn't exist, which the API Gateway forums say returns a 403

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment