better error object on callback