fix: gravatar profile image
This commit is contained in:
@@ -413,6 +413,9 @@ export const updateUserProfile = async (token: string, profile: object) => {
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
error = err.detail;
|
||||
if (Array.isArray(error)) {
|
||||
error = error.map((e: { msg?: string }) => e.msg).join("; ");
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
|
||||
@@ -16,10 +16,14 @@ export const getGravatarUrl = async (token: string, email: string) => {
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
error = err;
|
||||
error = err.detail ?? err;
|
||||
return null;
|
||||
});
|
||||
|
||||
if (error) {
|
||||
throw error;
|
||||
}
|
||||
|
||||
return res;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user