Skip to content

Commit 7a59513

Browse files
authored
Merge pull request #56 from mrysav/main
Print diagnostic message if snapshot creation is not SUCCESS or ACCEPTED
2 parents ba29f82 + f8d3a8a commit 7a59513

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/snapshot.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,16 @@ export async function submitSnapshot(
186186
...snapshot
187187
}
188188
)
189+
const result = response.data.result
190+
if (result === 'SUCCESS' || result === 'ACCEPTED') {
191+
core.notice(
192+
`Snapshot successfully created at ${response.data.created_at.toString()}`
193+
)
194+
} else {
195+
core.error(
196+
`Snapshot creation failed with result: "${result}: ${response.data.message}"`
197+
)
198+
}
189199
core.notice(
190200
`Snapshot successfully created at ${response.data.created_at.toString()}`
191201
)

0 commit comments

Comments
 (0)