handle onerror with not error object