Skip to content

Commit c160c4a

Browse files
fix: do not throw uninitialized for KV (#1064)
Co-authored-by: computermouth <[email protected]>
1 parent 9ed80ee commit c160c4a

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

runtime/fastly/host-api/host_api.cpp

+3-10
Original file line numberDiff line numberDiff line change
@@ -761,18 +761,10 @@ FastlyKVError make_fastly_kv_error(fastly::fastly_kv_error kv_error,
761761
err.detail = FastlyKVError::detail::bad_request;
762762
return err;
763763
}
764-
case KV_ERROR_INTERNAL_ERROR: {
765-
err.detail = FastlyKVError::detail::internal_error;
766-
return err;
767-
}
768764
case KV_ERROR_NOT_FOUND: {
769765
err.detail = FastlyKVError::detail::not_found;
770766
return err;
771767
}
772-
case KV_ERROR_OK: {
773-
err.detail = FastlyKVError::detail::ok;
774-
return err;
775-
}
776768
case KV_ERROR_PAYLOAD_TOO_LARGE: {
777769
err.detail = FastlyKVError::detail::payload_too_large;
778770
return err;
@@ -785,8 +777,9 @@ FastlyKVError make_fastly_kv_error(fastly::fastly_kv_error kv_error,
785777
err.detail = FastlyKVError::detail::too_many_requests;
786778
return err;
787779
}
788-
case KV_ERROR_UNINITIALIZED: {
789-
err.detail = FastlyKVError::detail::uninitialized;
780+
case KV_ERROR_INTERNAL_ERROR:
781+
default: {
782+
err.detail = FastlyKVError::detail::internal_error;
790783
return err;
791784
}
792785
}

0 commit comments

Comments
 (0)