MatteoGioioso / MatteoGioioso/serverless-pg
Add explicit opt-out for error swallowing
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 324
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Might be better to add an explicit opt-out to swallow internal errors:
```javascript
} 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
}
}
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the error-handling catch block that returns { rows: [] }, then review how _config is defined and how internal errors are logged. Done means the swallowing behavior can be explicitly controlled through the proposed errorSwallow setting, with errors otherwise rethrown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs, postgresql
- Domain
- backend, database
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100