error reporting + rest API improvement