@@ -258,7 +258,7 @@ async fn instance_ensure_common(
258258 | VmError :: AlreadyInitialized
259259 | VmError :: RundownInProgress => HttpError :: for_client_error (
260260 Some ( api:: ErrorCode :: AlreadyInitialized . to_string ( ) ) ,
261- http :: StatusCode :: CONFLICT ,
261+ hyper :: StatusCode :: CONFLICT ,
262262 "instance already initialized" . to_string ( ) ,
263263 ) ,
264264 VmError :: InitializationFailed ( e) => HttpError :: for_internal_error (
@@ -390,7 +390,7 @@ async fn instance_state_monitor(
390390 state_watcher. changed ( ) . await . map_err ( |_| {
391391 HttpError :: for_client_error (
392392 Some ( api:: ErrorCode :: NoInstance . to_string ( ) ) ,
393- http :: status :: StatusCode :: GONE ,
393+ hyper :: StatusCode :: GONE ,
394394 format ! (
395395 "No instance present; will never reach generation {}" ,
396396 gen
@@ -420,7 +420,7 @@ async fn instance_state_put(
420420 }
421421 VmError :: ForbiddenStateChange ( reason) => HttpError :: for_status (
422422 Some ( format ! ( "instance state change not allowed: {}" , reason) ) ,
423- http :: status :: StatusCode :: FORBIDDEN ,
423+ hyper :: StatusCode :: FORBIDDEN ,
424424 ) ,
425425 _ => HttpError :: for_internal_error ( format ! (
426426 "unexpected error from VM controller: {e}"
@@ -674,7 +674,7 @@ async fn instance_issue_crucible_vcr_request(
674674 . map_err ( |e| match e {
675675 VmError :: ForbiddenStateChange ( reason) => HttpError :: for_status (
676676 Some ( format ! ( "instance state change not allowed: {}" , reason) ) ,
677- http :: status :: StatusCode :: FORBIDDEN ,
677+ hyper :: StatusCode :: FORBIDDEN ,
678678 ) ,
679679 _ => HttpError :: for_internal_error ( format ! (
680680 "unexpected error from VM controller: {e}"
@@ -730,7 +730,7 @@ pub fn api() -> ApiDescription<Arc<DropshotEndpointContext>> {
730730fn not_created_error ( ) -> HttpError {
731731 HttpError :: for_client_error (
732732 Some ( api:: ErrorCode :: NoInstance . to_string ( ) ) ,
733- http :: StatusCode :: FAILED_DEPENDENCY ,
733+ hyper :: StatusCode :: FAILED_DEPENDENCY ,
734734 "Server not initialized (no instance)" . to_string ( ) ,
735735 )
736736}
0 commit comments