diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 4df0a969..1650b40d 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -118,7 +118,7 @@ async fn cmd_render_template( workspace_id: &str, environment_id: Option<&str>, purpose: Option, - ignore_error: bool, + ignore_error: Option, ) -> YaakResult { let environment_chain = app_handle.db().resolve_environments(workspace_id, None, environment_id)?; @@ -131,10 +131,9 @@ async fn cmd_render_template( purpose.unwrap_or(RenderPurpose::Preview), ), &RenderOptions { - error_behavior: if ignore_error { - RenderErrorBehavior::ReturnEmpty - } else { - RenderErrorBehavior::Throw + error_behavior: match ignore_error { + Some(true) => RenderErrorBehavior::ReturnEmpty, + _ => RenderErrorBehavior::Throw, }, }, ) diff --git a/src-web/components/HttpAuthenticationEditor.tsx b/src-web/components/HttpAuthenticationEditor.tsx index c7f062c9..ccf46370 100644 --- a/src-web/components/HttpAuthenticationEditor.tsx +++ b/src-web/components/HttpAuthenticationEditor.tsx @@ -1,4 +1,10 @@ -import type { Folder, GrpcRequest, HttpRequest, WebsocketRequest, Workspace } from '@yaakapp-internal/models'; +import type { + Folder, + GrpcRequest, + HttpRequest, + WebsocketRequest, + Workspace, +} from '@yaakapp-internal/models'; import { patchModel } from '@yaakapp-internal/models'; import { useCallback } from 'react'; import { openFolderSettings } from '../commands/openFolderSettings'; @@ -121,7 +127,6 @@ export function HttpAuthenticationEditor({ model }: Props) { } else { disabled = ''; } - console.log('SETTING DISABLED', disabled); await handleChange({ ...model.authentication, disabled }); }} /> @@ -178,7 +183,6 @@ function AuthenticationDisabledInput({ template: value, enabled: true, purpose: 'preview', - ignoreError: true, refreshKey: value, }); diff --git a/src-web/components/core/SegmentedControl.tsx b/src-web/components/core/SegmentedControl.tsx index 45c9cbf8..b75060f3 100644 --- a/src-web/components/core/SegmentedControl.tsx +++ b/src-web/components/core/SegmentedControl.tsx @@ -81,6 +81,7 @@ export function SegmentedControl({ return (