File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
shared/src/database/services/contributor Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -81,16 +81,22 @@ export class ContributorService extends BaseService {
8181 } ) ;
8282
8383 if ( ! existing ) {
84- return this . resultFail ( 'Recipient not found' ) ;
84+ return this . resultFail ( 'Contributor not found' ) ;
8585 }
8686
8787 if ( ! contributor . contact ?. update ?. data ?. email ) {
8888 return this . resultFail ( 'Contributor email is required' ) ;
8989 }
9090
91- await this . firebaseAuthService . updateByUid ( existing . account . firebaseAuthUserId , {
92- email : contributor . contact ?. update ?. data ?. email ?. toString ( ) ?? undefined ,
93- } ) ;
91+ try {
92+ await this . firebaseAuthService . updateByUid ( existing . account . firebaseAuthUserId , {
93+ email : contributor . contact ?. update ?. data ?. email ?. toString ( ) ?? undefined ,
94+ } ) ;
95+ } catch ( error ) {
96+ // for now, dont fail the update if firebase user cannot be updated, because there is no auth user for every contributor
97+ console . warn ( 'Could not update Firebase Auth user for contributor:' , error ) ;
98+ }
99+
94100 const updatedContributor = await this . db . contributor . update ( {
95101 where : { id : contributor . id ?. toString ( ) } ,
96102 data : contributor ,
You can’t perform that action at this time.
0 commit comments