mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-03 17:26:38 +00:00
♻️ include Blueprint applied with errors: in blueprint message when it fails
This commit is contained in:
@@ -141,7 +141,7 @@ export async function applyBlueprint({
|
|||||||
blueprintMessage = "Blueprint applied successfully";
|
blueprintMessage = "Blueprint applied successfully";
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
blueprintSucceeded = false;
|
blueprintSucceeded = false;
|
||||||
blueprintMessage = `Failed to update blueprint from config: ${err}`;
|
blueprintMessage = `Blueprint applied with errors: ${err}`;
|
||||||
logger.error(blueprintMessage);
|
logger.error(blueprintMessage);
|
||||||
error = err;
|
error = err;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,7 +123,9 @@ export async function applyYAMLBlueprint(
|
|||||||
return next(
|
return next(
|
||||||
createHttpError(
|
createHttpError(
|
||||||
HttpCode.INTERNAL_SERVER_ERROR,
|
HttpCode.INTERNAL_SERVER_ERROR,
|
||||||
error ? error : "An unknown error occurred while applying the blueprint"
|
error
|
||||||
|
? error
|
||||||
|
: "An unknown error occurred while applying the blueprint"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -132,9 +134,7 @@ export async function applyYAMLBlueprint(
|
|||||||
data: blueprint,
|
data: blueprint,
|
||||||
success: true,
|
success: true,
|
||||||
error: false,
|
error: false,
|
||||||
message: blueprint.succeeded
|
message: "Done",
|
||||||
? "Blueprint applied with success"
|
|
||||||
: `Blueprint applied with errors: ${blueprint.message}`,
|
|
||||||
status: HttpCode.CREATED
|
status: HttpCode.CREATED
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user