Closed andycaramba closed 7 years ago
You can modify the error with hook.error
in an error hook:
app.service('myservice').hooks({
error(hook) {
const { error } = hook;
if(error.name === 'NotAuthenticated' && hook.params.user.language === 'de') {
error.message = "Bitte anmelden";
}
hook.error = error;
}
})
@daffl thank you, it works
How can I internationalise error messages like 'Invalid login' and so on?