fix error handling, allow building an es6 module

This commit is contained in:
ading2210 2024-01-09 19:36:46 -05:00
parent e4c064401e
commit bb31ef120f
4 changed files with 26 additions and 4 deletions

View file

@ -96,6 +96,7 @@ class Headers {
}
}
this[prop] = value;
return true;
}
}
@ -214,6 +215,7 @@ function libcurl_fetch(url, params={}) {
let finish_callback = (error, response_info) => {
if (error != 0) {
reject("libcurl.js encountered an error: " + error);
return;
}
let response_data = merge_arrays(chunks);
let response_obj = create_response(response_data, response_info);