Skip to content

Instantly share code, notes, and snippets.

@mpalmr
Created April 29, 2018 22:35
Show Gist options
  • Save mpalmr/4d62cf8a040bd27962969db888adff8d to your computer and use it in GitHub Desktop.
Save mpalmr/4d62cf8a040bd27962969db888adff8d to your computer and use it in GitHub Desktop.
curl 'http://localhost:3000/api/v1/login' -H 'Pragma: no-cache' -H 'HSJri: aaJJnGCm' -H 'Accepts: application/json' -H 'Origin: http://localhost:3000' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.9' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36' -H 'Content-Type: application/json' -H 'Accept: */*' -H 'Cache-Control: no-cache' -H 'Referer: http://localhost:3000/' -H 'Connection: keep-alive' -H 'DNT: 1' --data-binary '{"email":"mspalmer91@gmail.com","password":"hunter1"}' --compressed
Responds as 404
/Users/matt/proj/web…/application.js:630 error: duplicate key value violates unique constraint "sessions_pkey"
at Connection.parseE (/Users/matt/proj/website/node_modules/pg/lib/connection.js:545:11)
at Connection.parseMessage (/Users/matt/proj/website/node_modules/pg/lib/connection.js:370:19)
at Socket.<anonymous> (/Users/matt/proj/website/node_modules/pg/lib/connection.js:113:22)
at Socket.emit (events.js:180:13)
at addChunk (_stream_readable.js:274:12)
at readableAddChunk (_stream_readable.js:261:11)
at Socket.Readable.push (_stream_readable.js:218:10)
at TCP.onread (net.js:581:20)
From previous event:
at Client_PG._query (/Users/matt/proj/website/node_modules/knex/lib/dialects/postgres/index.js:287:12)
at Client_PG.query (/Users/matt/proj/website/node_modules/knex/lib/client.js:206:17)
at Runner.<anonymous> (/Users/matt/proj/website/node_modules/knex/lib/runner.js:155:36)
From previous event:
at /Users/matt/proj/website/node_modules/knex/lib/runner.js:61:21
From previous event:
at Runner.run (/Users/matt/proj/website/node_modules/knex/lib/runner.js:47:31)
at Raw.Target.then (/Users/matt/proj/website/node_modules/knex/lib/interface.js:39:43)
at Raw.Target.(anonymous function) [as asCallback] (/Users/matt/proj/website/node_modules/knex/lib/interface.js:93:26)
at /Users/matt/proj/website/node_modules/connect-session-knex/index.js:299:6
at runCallback (timers.js:763:18)
at tryOnImmediate (timers.js:734:5)
at processImmediate (timers.js:716:5)
From previous event:
at KnexStore.set (/Users/matt/proj/website/node_modules/connect-session-knex/index.js:297:22)
at Session.save (/Users/matt/proj/website/node_modules/express-session/session/session.js:72:25)
at Session.save (/Users/matt/proj/website/node_modules/express-session/index.js:381:15)
at ServerResponse.end (/Users/matt/proj/website/node_modules/express-session/index.js:330:21)
at ServerResponse.send (/Users/matt/proj/website/node_modules/express/lib/response.js:221:10)
at login.then (/Users/matt/proj/website/src/api/user/login.js:30:14)
at <anonymous>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment