diff --git a/src/app/account/account-form.jsx b/src/app/account/account-form.jsx index 736635d..cefbac8 100644 --- a/src/app/account/account-form.jsx +++ b/src/app/account/account-form.jsx @@ -105,7 +105,11 @@ export default function AccountForm({ user }) { if (error) throw error; setStatus(true); } catch (error) { - setError(true); + if (error.code == 23505) { + setError("The username \"" + username + "\" is already taken. Please try a different username.") + } else { + setError("Errored with code " + error.code + "... Please try again.") + } } finally { setLoading(false); } @@ -131,12 +135,6 @@ export default function AccountForm({ user }) { return ( - {/*
- Box 1 -
*/} - {/* - Box 2 - */} @@ -359,7 +357,7 @@ export default function AccountForm({ user }) { Error! - Error updating the data... Please try again. + Error updating the data. {error}