@@ -272,7 +272,7 @@ async fn instance_ensure_common(
272272 | VmError :: AlreadyInitialized
273273 | VmError :: RundownInProgress => HttpError :: for_client_error (
274274 Some ( api:: ErrorCode :: AlreadyInitialized . to_string ( ) ) ,
275- http :: StatusCode :: CONFLICT ,
275+ hyper :: StatusCode :: CONFLICT ,
276276 "instance already initialized" . to_string ( ) ,
277277 ) ,
278278 VmError :: InitializationFailed ( e) => HttpError :: for_internal_error (
@@ -409,7 +409,7 @@ async fn instance_state_monitor(
409409 state_watcher. changed ( ) . await . map_err ( |_| {
410410 HttpError :: for_client_error (
411411 Some ( api:: ErrorCode :: NoInstance . to_string ( ) ) ,
412- http :: status :: StatusCode :: GONE ,
412+ hyper :: StatusCode :: GONE ,
413413 format ! (
414414 "No instance present; will never reach generation {}" ,
415415 gen
@@ -439,7 +439,7 @@ async fn instance_state_put(
439439 }
440440 VmError :: ForbiddenStateChange ( reason) => HttpError :: for_status (
441441 Some ( format ! ( "instance state change not allowed: {}" , reason) ) ,
442- http :: status :: StatusCode :: FORBIDDEN ,
442+ hyper :: StatusCode :: FORBIDDEN ,
443443 ) ,
444444 _ => HttpError :: for_internal_error ( format ! (
445445 "unexpected error from VM controller: {e}"
@@ -693,7 +693,7 @@ async fn instance_issue_crucible_vcr_request(
693693 . map_err ( |e| match e {
694694 VmError :: ForbiddenStateChange ( reason) => HttpError :: for_status (
695695 Some ( format ! ( "instance state change not allowed: {}" , reason) ) ,
696- http :: status :: StatusCode :: FORBIDDEN ,
696+ hyper :: StatusCode :: FORBIDDEN ,
697697 ) ,
698698 _ => HttpError :: for_internal_error ( format ! (
699699 "unexpected error from VM controller: {e}"
@@ -749,7 +749,7 @@ pub fn api() -> ApiDescription<Arc<DropshotEndpointContext>> {
749749fn not_created_error ( ) -> HttpError {
750750 HttpError :: for_client_error (
751751 Some ( api:: ErrorCode :: NoInstance . to_string ( ) ) ,
752- http :: StatusCode :: FAILED_DEPENDENCY ,
752+ hyper :: StatusCode :: FAILED_DEPENDENCY ,
753753 "Server not initialized (no instance)" . to_string ( ) ,
754754 )
755755}
0 commit comments