@DaggieBlanqx this is just a minor enhancement that ensures error messages are very specific.
Instead of having compound conditional checks like
if (!button.title || button.title.length > 20) {
throw new Error(
'"title" is required in making a request. The button title must be between 1 and 20 characters long.'
);
}
Separating the conditions makes the error message much more specific
So the conditions will now become
if (!button.title) {
throw new Error(
'"title" is required in making a request.'
);
}
if (button.title.length > 20) {
throw new Error(
'The button title must be between 1 and 20 characters long.'
);
}
Also, I have noticed there is still some work required for better error handling, I am happy to help with this or anything else that is a priority for the project :)
@DaggieBlanqx this is just a minor enhancement that ensures error messages are very specific.
Instead of having compound conditional checks like
Separating the conditions makes the error message much more specific
So the conditions will now become
Also, I have noticed there is still some work required for better error handling, I am happy to help with this or anything else that is a priority for the project :)