Polygon-Solutions / city-keep

CityKeep - Civic Issue Reporting App
https://www.citykeep.app
MIT License
0 stars 1 forks source link

CK18 - Authentication Cleanup #35

Closed malakivandas closed 1 year ago

malakivandas commented 1 year ago
  1. Removed unnecessary trycatch blocks where the error would propagate anyways ( ex. try{ } catch {throw err} )
  2. Added error handling to the loadUser() function using a try-catch block to catch any errors that may occur while making API requests.
  3. Modified the signIn() function to use a Promise to handle any errors that may occur while authenticating a user and added error handling to the Promise's reject() method.
  4. Simplified the signIn() function by reducing code duplication.