Skip to content

Commit ee07cf2

Browse files
authored
Handle unauthorized errors in mutexbot actions (#5)
1 parent 8327c8f commit ee07cf2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

mutexbot/release/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ runs:
3939
rm response.json
4040
elif [ "$RESPONSE" -eq 208 ]; then
4141
handle_error "Resource not reserved. Aborting."
42+
elif [ "$RESPONSE" -eq 401 ]; then
43+
handle_error "Unauthorized! Check your API keys."
4244
elif [ "$RESPONSE" -eq 404 ]; then
4345
handle_error "Resource not found."
4446
elif [ "$RESPONSE" -eq 409 ]; then

mutexbot/reserve/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ runs:
5151
sleep 5 # Wait before retrying
5252
elif [ "$RESPONSE" -eq 400 ]; then
5353
handle_error "Bad request. Check your input data."
54+
elif [ "$RESPONSE" -eq 401 ]; then
55+
handle_error "Unauthorized! Check your API keys."
5456
elif [ "$RESPONSE" -eq 404 ]; then
5557
handle_error "Resource not found."
5658
else

0 commit comments

Comments
 (0)