Skip to content

Commit f1a22a4

Browse files
Jake ChampionJakeChampion
authored andcommitted
fix: error message is latin1, we need to use JS_ReportErrorLatin1 to convert the message from latin1 to UTF8CharsZ, otherwise a panic occurs
this was found by running the object-store tests via `❯ DEBUG=1 ./run-local dynamic-backend`
1 parent 4bc9d59 commit f1a22a4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

c-dependencies/js-compute-runtime/js-compute-builtins.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4663,11 +4663,11 @@ bool fetch(JSContext *cx, unsigned argc, Value *vp) {
46634663
xqd_world_string_t uri_str;
46644664
fastly_error_t err;
46654665
if (xqd_fastly_http_req_uri_get(handle, &uri_str, &err)) {
4666-
JS_ReportErrorUTF8(cx,
4667-
"No backend specified for request with url %s. "
4668-
"Must provide a `backend` property on the `init` object "
4669-
"passed to either `new Request()` or `fetch`",
4670-
uri_str.ptr);
4666+
JS_ReportErrorLatin1(cx,
4667+
"No backend specified for request with url %s. "
4668+
"Must provide a `backend` property on the `init` object "
4669+
"passed to either `new Request()` or `fetch`",
4670+
uri_str.ptr);
46714671
JS_free(cx, uri_str.ptr);
46724672
} else {
46734673
HANDLE_ERROR(cx, err);

0 commit comments

Comments
 (0)