Keep getting 400 Bad Request error when trying out AJAX on custom theme

I figured it out. I deleted two lines:

dataType: 'html',
contentType: 'application/json'

When I deleted those, I got an 200 response with the appropriate response text.

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