In an effort to make it easier to port diagnostics to `SessionDiagnostic` (for translation) and since translation slugs could replace error codes, make error codes optional in the `SessionDiagnostic` derive. Signed-off-by: David Wood <david.wood@huawei.com>