Fix for when qurey databse can not found, response 401 error code