cosmicds / cds-api

API for accessing the CosmicDS database
GNU General Public License v3.0
0 stars 3 forks source link

Improve Promise error handling #141

Closed Carifio24 closed 1 week ago

Carifio24 commented 1 week ago

This PR is intended to help with #139. While this doesn't prevent any possible errors, this PR enables the @typescript-eslint/no-floating-promises rule to help make sure that we're handling our promises correctly. This also fixes the issues that were flagged by that rule. In most cases this amounted to some straightforward error handling, but there were a few endpoints that do multiple inserts into tables where I decided that the best way to handle things was by refactoring to use transactions.