Skip to content

Commit 247c6b9

Browse files
committed
remove try catch
1 parent 09f2894 commit 247c6b9

1 file changed

Lines changed: 5 additions & 13 deletions

File tree

src/commands/edit-input-schema.ts

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,11 @@ export class EditInputSchemaCommand extends ApifyCommand<typeof EditInputSchemaC
4141
static override aliases = ['eis'];
4242

4343
async run() {
44-
let result: Awaited<ReturnType<typeof readInputSchema>>;
45-
46-
try {
47-
result = await readInputSchema({
48-
forcePath: this.args.path,
49-
cwd: process.cwd(),
50-
});
51-
} catch (err) {
52-
error({ message: (err as Error).message });
53-
return;
54-
}
55-
56-
const { inputSchema: existingSchema, inputSchemaPath } = result;
44+
// This call fails if no input schema is found on any of the default locations
45+
const { inputSchema: existingSchema, inputSchemaPath } = await readInputSchema({
46+
forcePath: this.args.path,
47+
cwd: process.cwd(),
48+
});
5749

5850
if (existingSchema && !inputSchemaPath) {
5951
// If path is not returned, it means the input schema must be directly embedded as object in actor.json

0 commit comments

Comments
 (0)