Canvas: Button API update toaster error message (#76988)

This commit is contained in:
Adela Almasan 2023-10-23 13:34:16 -06:00 committed by GitHub
parent 4e8c4869d1
commit 4df4844c1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,8 @@ export const callApi = (api: APIEditorConfig, updateLoadingStateCallback?: IsLoa
.fetch(request)
.subscribe({
error: (error) => {
appEvents.emit(AppEvents.alertError, ['An error has occurred: ', JSON.stringify(error)]);
appEvents.emit(AppEvents.alertError, ['An error has occurred. Check console output for more details.']);
console.error('API call error: ', error);
updateLoadingStateCallback && updateLoadingStateCallback(false);
},
complete: () => {