untoldone / bloomapi

Create APIs out of public datasources
https://www.bloomapi.com/documentation/public-data
MIT License
89 stars 29 forks source link

Fix untoldone/bloomapi issue #38 #39

Closed marks closed 10 years ago

marks commented 10 years ago

@untoldone - this should fix it. I'm no Q/deferred genius still but I think it makes sense. Unfortunately using the error code seems to be the best way to catch this. A log of the error object isn't too descriptive (below) and I didn't want to make it dependent on the source_status field.

{ [error: type "source_status" already exists]
  length: 86,
  name: 'error',
  severity: 'ERROR',
  code: '42710',
  detail: undefined,
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  file: 'typecmds.c',
  line: '1084',
  routine: 'DefineEnum' }