MCPcopy Index your code
hub / github.com/simstudioai/sim / useLogDetail

Function useLogDetail

apps/sim/hooks/queries/logs.ts:187–201  ·  view source on GitHub ↗
(
  logId: string | undefined,
  workspaceId: string | undefined,
  options?: UseLogDetailOptions
)

Source from the content-addressed store, hash-verified

185}
186
187export function useLogDetail(
188 logId: string | undefined,
189 workspaceId: string | undefined,
190 options?: UseLogDetailOptions
191) {
192 return useQuery({
193 queryKey: logKeys.detail(workspaceId, logId),
194 queryFn: ({ signal }) => fetchLogDetail(logId as string, workspaceId as string, signal),
195 enabled: Boolean(logId) && Boolean(workspaceId) && (options?.enabled ?? true),
196 refetchInterval: options?.refetchInterval ?? false,
197 staleTime: 30 * 1000,
198 retry: (failureCount, err) =>
199 !(isApiClientError(err) && err.status === 404) && failureCount < 3,
200 })
201}
202
203export function useLogByExecutionId(
204 workspaceId: string | undefined,

Callers 3

LogsFunction · 0.90
EmbeddedLogFunction · 0.90
EmbeddedLogActionsFunction · 0.90

Calls 2

isApiClientErrorFunction · 0.90
fetchLogDetailFunction · 0.70

Tested by

no test coverage detected