How to detect if the ajax_query_attachments_args was triggered to set the featured image?

How to detect if the ajax_query_attachments_args was triggered to set the featured image?

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