Adding custom logger to have more logs on API call error

Used to know how to fix #2820 in future