withErrorId

inline fun withErrorId(errorId: ErrorId): Error

Creates a copy of the Error object adding the given errorId, preserving metadata.