@@ -63,6 +63,9 @@ export class ElementACLDialogComponent implements OnInit {
6363
6464 get errorDetail ( ) {
6565 let error = this . data . error . error ;
66+ if ( this . data . error . status === 500 ) {
67+ error = this . data . error . message ;
68+ }
6669 if ( Array . isArray ( error ) ) {
6770 error = error . join ( ' ' ) ;
6871 } else if ( typeof error === 'object' ) {
@@ -108,7 +111,6 @@ export class ElementACLDialogComponent implements OnInit {
108111 this . code = 'face_verify_capture' ;
109112 this . content = this . getDialogContent ( this . code ) ;
110113
111-
112114 const timer = setInterval ( ( ) => {
113115 this . _http . getFaceVerifyState ( connToken . face_token ) . subscribe ( async data => {
114116 if ( data . is_finished ) {
@@ -279,7 +281,7 @@ export class ElementACLDialogComponent implements OnInit {
279281
280282 if ( state === 'approved' ) {
281283 const msg = await this . _i18n . t ( 'Login review approved' ) ;
282- this . _toastr . success ( msg , '' , { nzClass : 'custom-success-notification' } ) ;
284+ this . _toastr . success ( msg , '' , { nzClass : 'custom-success-notification' } ) ;
283285 this . dialogRef . close ( this . connectionToken ) ;
284286 } else if ( state === 'rejected' ) {
285287 this . code = 'ticket_review_rejected' ;
@@ -362,7 +364,7 @@ export class ElementACLDialogComponent implements OnInit {
362364 } ,
363365 acl_face_online_not_supported : {
364366 title : 'Login reminder' ,
365- message : 'FaceOnlineNotSupported' ,
367+ message : this . errorDetail ,
366368 isError : true ,
367369 actions : [
368370 {
@@ -407,7 +409,7 @@ export class ElementACLDialogComponent implements OnInit {
407409 text : 'Copy link' ,
408410 type : 'primary' ,
409411 callback : ( ) => {
410- vm . onCopySuccess ( this . connectionToken ?. from_ticket_info ?. ticket_detail_page_url )
412+ vm . onCopySuccess ( this . connectionToken ?. from_ticket_info ?. ticket_detail_page_url ) ;
411413 }
412414 }
413415 ]
@@ -455,13 +457,10 @@ export class ElementACLDialogComponent implements OnInit {
455457 callback : ( ) => vm . closeDialog ( )
456458 }
457459 ]
458- }
459- } ;
460-
461- return (
462- contentMap [ code ] || {
463- title : 'Login reminder' ,
464- message : this . data . errorDetail ,
460+ } ,
461+ unknown : {
462+ title : 'Unknown error' ,
463+ message : this . errorDetail ,
465464 isError : true ,
466465 actions : [
467466 {
@@ -470,6 +469,8 @@ export class ElementACLDialogComponent implements OnInit {
470469 }
471470 ]
472471 }
473- ) ;
472+ } ;
473+
474+ return contentMap [ code ] || contentMap . unknown ;
474475 }
475476}
0 commit comments