const userMessages = {
    401: 'You are not authenticated or your access token is invalid (e.g., expired). ' +
         'Please login and try to run the same command.',
    403: 'You don\'t have the required application role to access this resource. ' +
         'Please ask your administrator to assign the relevant application role to you.'
};

export const error = (message, code = 0) => Object.create(Error.prototype, {
    code: { value: code },
    message: { value: message },
    userMessage: { value: userMessages[code] }
});
