const errors = { user: { notfound: { message: "User does not exist", code: 11 }, badpassword: { message: "Incorrect password", code: 12 }, nouser: { message: "No user specified", code: 13 } }, register: { exists: { message: "User already exists", code: 21 } }, vote: { baduser: { message: "User does not exist or incorrect password", code: 31 }, novotes: { message: "User does not exist or has not yet voted", code: 32 } }, votes: { toosoon: { message: "Too soon to show you that", code: 41 }, novotes: { message: "Nobody has voted yet", code: 42 } } }; export default errors;