mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 01:25:36 -05:00
handle validation error (#18766)
This commit is contained in:
@@ -89,6 +89,9 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
|
||||
this.updateState(this.valid, this.dirty, 'processEdit');
|
||||
this._provider.processTableEdit(this.tableInfo, edit).then(
|
||||
result => {
|
||||
if (result.inputValidationError) {
|
||||
this._errorMessageService.showDialog(Severity.Error, ErrorDialogTitle, localize('tableDesigner.inputValidationError', "The input validation failed with error: {0}", result.inputValidationError));
|
||||
}
|
||||
this._viewModel = result.viewModel;
|
||||
if (result.view) {
|
||||
this.setDesignerView(result.view);
|
||||
@@ -189,6 +192,10 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
|
||||
this.updateState(this.valid, this.dirty);
|
||||
return;
|
||||
}
|
||||
if (previewReportResult.schemaValidationError) {
|
||||
this._errorMessageService.showDialog(Severity.Error, ErrorDialogTitle, localize('tableDesigner.TableSchemaValidationError', "Table schema validation failed with error: {0}", previewReportResult.schemaValidationError));
|
||||
return;
|
||||
}
|
||||
const dialog = this._instantiationService.createInstance(TableDesignerPublishDialog);
|
||||
const result = await dialog.open(previewReportResult.report, previewReportResult.mimeType);
|
||||
if (result === TableDesignerPublishDialogResult.GenerateScript) {
|
||||
|
||||
Reference in New Issue
Block a user