File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -885,15 +885,21 @@ FastlyKVError make_fastly_kv_error(fastly::fastly_kv_error kv_error,
885885 err.detail = FastlyKVError::detail::too_many_requests;
886886 return err;
887887 }
888- case KV_ERROR_INTERNAL_ERROR:
889- default : {
888+ case KV_ERROR_INTERNAL_ERROR: {
890889 err.detail = FastlyKVError::detail::internal_error;
891890 return err;
892891 }
892+ case KV_ERROR_OK:
893+ case KV_ERROR_UNINITIALIZED:
894+ default : {
895+ // If the hostcall never initialized `kv_error`, or if it claimed
896+ // that it was `OK` but we still failed, then make a host error
897+ // based on the `host_err` value.
898+ err.detail = FastlyKVError::detail::host_error;
899+ err.host_err = host_err;
900+ return err;
901+ }
893902 }
894- err.detail = FastlyKVError::detail::host_error;
895- err.host_err = host_err;
896- return err;
897903}
898904
899905FastlyImageOptimizerError
You can’t perform that action at this time.
0 commit comments