mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 02:51:14 +00:00
feat(core): Update LLM applications building support (no-changelog) (#7710)
extracted out of #7336 --------- Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> Co-authored-by: Oleg Ivaniv <me@olegivaniv.com> Co-authored-by: Alex Grozav <alex@grozav.com>
This commit is contained in:
committed by
GitHub
parent
4a89504d54
commit
117962d473
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="error-header">
|
||||
<div class="error-message">{{ getErrorMessage() }}</div>
|
||||
<div class="error-message" v-text="getErrorMessage()" />
|
||||
<div class="error-description" v-if="error.description" v-html="getErrorDescription()"></div>
|
||||
</div>
|
||||
<details>
|
||||
@@ -125,7 +125,12 @@ import { copyPaste } from '@/mixins/copyPaste';
|
||||
import { useToast } from '@/composables/useToast';
|
||||
import { MAX_DISPLAY_DATA_SIZE } from '@/constants';
|
||||
|
||||
import type { INodeProperties, INodePropertyCollection, INodePropertyOptions } from 'n8n-workflow';
|
||||
import type {
|
||||
INodeProperties,
|
||||
INodePropertyCollection,
|
||||
INodePropertyOptions,
|
||||
NodeOperationError,
|
||||
} from 'n8n-workflow';
|
||||
import { sanitizeHtml } from '@/utils/htmlUtils';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||
@@ -170,6 +175,18 @@ export default defineComponent({
|
||||
.replace(/%%PARAMETER_FULL%%/g, parameterFullName);
|
||||
},
|
||||
getErrorDescription(): string {
|
||||
const isSubNodeError =
|
||||
this.error.name === 'NodeOperationError' &&
|
||||
(this.error as NodeOperationError).functionality === 'configuration-node';
|
||||
|
||||
if (isSubNodeError) {
|
||||
return sanitizeHtml(
|
||||
this.error.description +
|
||||
this.$locale.baseText('pushConnection.executionError.openNode', {
|
||||
interpolate: { node: this.error.node.name },
|
||||
}),
|
||||
);
|
||||
}
|
||||
if (!this.error.context?.descriptionTemplate) {
|
||||
return sanitizeHtml(this.error.description);
|
||||
}
|
||||
@@ -182,6 +199,20 @@ export default defineComponent({
|
||||
getErrorMessage(): string {
|
||||
const baseErrorMessage = this.$locale.baseText('nodeErrorView.error') + ': ';
|
||||
|
||||
const isSubNodeError =
|
||||
this.error.name === 'NodeOperationError' &&
|
||||
(this.error as NodeOperationError).functionality === 'configuration-node';
|
||||
|
||||
if (isSubNodeError) {
|
||||
const baseErrorMessageSubNode = this.$locale.baseText('nodeErrorView.errorSubNode', {
|
||||
interpolate: { node: this.error.node.name },
|
||||
});
|
||||
return baseErrorMessageSubNode;
|
||||
}
|
||||
|
||||
if (this.error.message === this.error.description) {
|
||||
return baseErrorMessage;
|
||||
}
|
||||
if (!this.error.context?.messageTemplate) {
|
||||
return baseErrorMessage + this.error.message;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user