Skip to content

Instantly share code, notes, and snippets.

@RexMorgan
Created May 6, 2012 22:27
Show Gist options
  • Save RexMorgan/2624825 to your computer and use it in GitHub Desktop.
Save RexMorgan/2624825 to your computer and use it in GitHub Desktop.
Error
app.post '/sign-up', (req, res) ->
User.create
email: req.body.email,
domain: req.body.domain + '.foilr.com'
.success (user) ->
user.setPassword req.body.password, ->
user.save()
.success ->
res.redirect '/login'
.error (err) ->
res.end err.toString(), 500
.error (err) ->
res.end err.toString(), 500
{ [error: null value in column "id" violates not-null constraint]
length: 110,
name: 'error',
severity: 'ERROR',
code: '23502',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
file: 'execMain.c',
line: '1569',
routine: 'ExecConstraints' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment