impress-2020/src/server
Matchu 2fb84b0b0f Better handle editUsername when Auth0 update fails
Hmm, right, okay, we *generally* should have all users imported to Auth0, but this can fail if the cron job is behind or Auth0 rejected the data (e.g. user data in a format it doesn't support).

Previously, this would apply the name change in the database, but return Auth0's "The user does not exist." error to the GraphQL client, making it look like the update fully failed.

In this change, we handle that case differently: when the Auth0 update fails with a 404, we proceed but log a warning; and when Auth0 fails with an unexpected error, we roll back the database change in addition to raising the error to the client, to keep the behavior obvious and consistent.
2021-10-21 12:17:12 -07:00
..
__image_snapshots__ outfit-images: render actual PNG and SVG layers! 2021-01-04 05:58:19 +00:00
__snapshots__ simplify validPetPoses out of the server directory 2020-09-06 00:40:00 -07:00
lib Apply sampling rates to Honeycomb events 2021-05-26 18:50:19 -07:00
types Better handle editUsername when Auth0 update fails 2021-10-21 12:17:12 -07:00
auth.js Fix misc lint errors 2021-05-03 15:06:07 -07:00
db.js Use ES module syntax in backend instead of require 2021-02-02 22:26:55 -08:00
index.js Lint against console.log 2021-05-03 15:01:49 -07:00
loaders.js Wire up the Remove button for item lists 2021-09-30 19:26:09 -07:00
modeling.js Lint against console.log 2021-05-03 15:01:49 -07:00
neopets-assets.js Support HTTPS asset URLs 2021-06-12 02:29:30 -07:00
outfit-images.js Fail harder when *all* layers fail to load 2021-09-03 14:55:50 -07:00
outfit-images.test.js Use Fastly to cache our PNG assets from S3 2021-05-12 22:49:59 -07:00
util.js Fix misc lint errors 2021-05-03 15:06:07 -07:00
util.test.js Fix misc lint errors 2021-05-03 15:06:07 -07:00