File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -728,6 +728,8 @@ fn dns_error(rcode: String, info_code: u16) -> ErrorCode {
728728 } )
729729}
730730
731+ // TODO: Remove this (and uses of it) once
732+ // https://github.com/spinframework/spin/issues/3274 has been addressed.
731733pub fn p2_to_p3_error_code ( code : p2_types:: ErrorCode ) -> p3_types:: ErrorCode {
732734 match code {
733735 p2_types:: ErrorCode :: DnsTimeout => p3_types:: ErrorCode :: DnsTimeout ,
@@ -828,6 +830,8 @@ pub fn p2_to_p3_error_code(code: p2_types::ErrorCode) -> p3_types::ErrorCode {
828830 }
829831}
830832
833+ // TODO: Remove this (and uses of it) once
834+ // https://github.com/spinframework/spin/issues/3274 has been addressed.
831835pub fn p3_to_p2_error_code ( code : p3_types:: ErrorCode ) -> p2_types:: ErrorCode {
832836 match code {
833837 p3_types:: ErrorCode :: DnsTimeout => p2_types:: ErrorCode :: DnsTimeout ,
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ impl HttpExecutor for SpinHttpExecutor {
3030 ) -> Result < Response < Body > > {
3131 let spin_http:: routes:: TriggerLookupKey :: Component ( component_id) = route_match. lookup_key ( )
3232 else {
33- anyhow :: bail! ( "INCONCEIVABLE" ) ;
33+ unreachable ! ( )
3434 } ;
3535
3636 tracing:: trace!( "Executing request using the Spin executor for component {component_id}" ) ;
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ impl HttpExecutor for WagiHttpExecutor<'_> {
2929 ) -> Result < Response < Body > > {
3030 let spin_http:: routes:: TriggerLookupKey :: Component ( component) = route_match. lookup_key ( )
3131 else {
32- anyhow :: bail! ( "INCONCEIVABLE" ) ;
32+ unreachable ! ( )
3333 } ;
3434
3535 tracing:: trace!(
You can’t perform that action at this time.
0 commit comments