mirror of
https://github.com/opentofu/setup-opentofu.git
synced 2026-12-01 04:04:28 +01:00
feat(error-handling): error notification for network failures (#94)
Signed-off-by: hoivikaj <github@hoivik.co>
This commit is contained in:
1 parent
4959f8f18c
commit
b572e07b01
7 files changed
+335
-52
No files matched your search
@@ -4,14 +4,17 @@
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
||||
import { setFailed } from '@actions/core';
|
||||
import { setFailed, debug } from '@actions/core';
|
||||
|
||||
import setup from './lib/setup-tofu.js';
|
||||
import { getErrorMessage, getErrorDetail } from './lib/error-utils.js';
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
await setup();
|
||||
} catch (error) {
|
||||
setFailed(error.message);
|
||||
const message = getErrorMessage(error);
|
||||
debug(getErrorDetail(error));
|
||||
setFailed(message);
|
||||
}
|
||||
})();
|
||||
Reference in new issue
Block a user