getMessage()) { case "Duplicate": throw new Exception("A user with this username or email already exists", 400); default: throw $err; } } } }