private NotificationResponse notificationError ( String errorMsg ) { NotificationError error = new NotificationError ( ) ; error . setError ( errorMsg ) ; error . setSource ( getClass ( ) . getSimpleName ( ) ) ; NotificationResponse notification = new NotificationResponse ( ) ; notification . setErrors ( Arrays . asList ( error ) ) ; return notification ; }
Error handler .