@@ -67,7 +67,7 @@ export function useFlytrapFunction<
6767 * Flytrap API.
6868 */
6969 saveErrorForFunction ( opts . id , error )
70-
70+ log . info ( 'capture' , `Captured error in async function with ID " ${ opts . id } ".` , { error } )
7171 const { error : saveError } = await tryCatch (
7272 getFlytrapStorage ( ) . saveCapture ( _executingFunctions , _functionCalls , error as Error )
7373 )
@@ -130,7 +130,7 @@ export function useFlytrapFunction<
130130 * Flytrap API.
131131 */
132132 saveErrorForFunction ( opts . id , error )
133-
133+ log . info ( 'capture' , `Captured error in function with ID " ${ opts . id } ".` , { error } )
134134 const { error : saveError } = tryCatchSync ( ( ) =>
135135 getFlytrapStorage ( ) . saveCapture ( _executingFunctions , _functionCalls , error as Error )
136136 )
@@ -228,7 +228,7 @@ export function useFlytrapCall<T>(fnOrNamespace: T, opts: FlytrapCallOptions): a
228228 * Flytrap API.
229229 */
230230 saveErrorForFunctionCall ( opts . id , error as Error )
231-
231+ log . info ( 'capture' , `Captured error in function call with ID " ${ opts . id } ".` , { error } )
232232 throw error
233233 }
234234}
@@ -272,7 +272,7 @@ export async function useFlytrapCallAsync<T extends (...args: any[]) => Promise<
272272 * Flytrap API.
273273 */
274274 saveErrorForFunctionCall ( opts . id , error )
275-
275+ log . info ( 'capture' , `Captured error in async function call with ID " ${ opts . id } ".` , { error } )
276276 throw error
277277 }
278278}
0 commit comments