add specific message for failure to convert to JSON

This commit is contained in:
buzz-lightsnack-2007 2024-05-25 00:01:58 +08:00
parent a377d28da8
commit eedd53aba4

View file

@ -42,7 +42,7 @@ export default class net {
if (STRICT) {
// Should not allow the data to be returned since it's not correct.
DATA = null;
throw new TypeError(texts.localized(`error_msg_notJSON`, false));
throw err;
} else {
logging.warn(texts.localized(`error_msg_notJSON`, false));
}