serverless-pg icon indicating copy to clipboard operation
serverless-pg copied to clipboard

Add explicit opt-out for error swallowing

Open MatteoGioioso opened this issue 3 years ago • 0 comments

Might be better to add an explicit opt-out to swallow internal errors:

} catch (e){
    if(this._config.errorSwallow){
       this._logger("Swallowed internal error", e.message)
       // Swallow the error, if this produce an error there is no need to error the function

      return {
        rows: []
     }
   } else {
    throw e
  }
}

MatteoGioioso avatar Dec 02 '20 00:12 MatteoGioioso