How to ignore WP_ERROR caused by “get_the_excerpt” method in an AJAX call?

How to ignore WP_ERROR caused by “get_the_excerpt” method in an AJAX call?

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)