Skip to content

Commit

Permalink
refactor: update error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
therealemjy committed Feb 7, 2025
1 parent 96b0502 commit 013de9f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import axios, { AxiosError } from 'axios';
import axios from 'axios';
import { getInput, getMultilineInput, setFailed } from '@actions/core';
import { context } from '@actions/github';

Expand Down Expand Up @@ -27,7 +27,8 @@ const run = async () => {

console.log('Target successfully pinged:\n', output.data);
} catch (error) {
setFailed(error as AxiosError);
setFailed('Failed to ping target');
console.log(error);
}
};

Expand Down

0 comments on commit 013de9f

Please sign in to comment.