Skip to content

Commit d78eb62

Browse files
committed
fix(obsidian): remove unreachable 404 handling from transformResponse
1 parent ce18495 commit d78eb62

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

apps/sim/tools/obsidian/get_active.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,6 @@ export const getActiveTool: ToolConfig<ObsidianGetActiveParams, ObsidianGetActiv
3535
},
3636

3737
transformResponse: async (response) => {
38-
if (!response.ok) {
39-
if (response.status === 404) {
40-
return {
41-
success: true,
42-
output: {
43-
content: '',
44-
filename: null,
45-
},
46-
}
47-
}
48-
const error = await response.json().catch(() => ({ message: 'Unknown error' }))
49-
throw new Error(`Failed to get active file: ${error.message ?? response.statusText}`)
50-
}
5138
const data = await response.json()
5239
return {
5340
success: true,

apps/sim/tools/obsidian/get_periodic_note.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,6 @@ export const getPeriodicNoteTool: ToolConfig<
4444
},
4545

4646
transformResponse: async (response, params) => {
47-
if (!response.ok) {
48-
if (response.status === 404) {
49-
return {
50-
success: true,
51-
output: {
52-
content: '',
53-
period: params?.period ?? '',
54-
},
55-
}
56-
}
57-
const error = await response.json().catch(() => ({ message: 'Unknown error' }))
58-
throw new Error(`Failed to get periodic note: ${error.message ?? response.statusText}`)
59-
}
6047
const content = await response.text()
6148
return {
6249
success: true,

0 commit comments

Comments
 (0)