Skip to content

Conversation

@ulyssa
Copy link
Contributor

@ulyssa ulyssa commented Jan 21, 2026

The make_fastly_kv_error doesn't handle the KV_ERROR_OK or KV_ERROR_UNINITIALIZED variants, which can happen if the hostcall fails in several unplanned ways, in which case it will return a corresponding FastlyStatus. It looks like the switch statement meant to use host_error in those cases, but the default: branch makes an internal_error instead.

I've updated the function to create a host_error and track the FastlyStatus value, which should make sure we hit this path and get the relevant status:

// kv error was a host call error -> report as host error
if (err.detail == FastlyKVError::detail::host_error) {
return handle_api_error(cx, err.host_error, line, func);
}

@zkat zkat enabled auto-merge (squash) January 22, 2026 00:03
@zkat zkat merged commit b3cc3ec into fastly:main Jan 22, 2026
16 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants