upload.notify_error fix- obtain stacktrace first

before doing anything else that might create a second stack trace
that hides the original error