File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export * from './workflow-handle';
22
22
export * from './deprecated-time' ;
23
23
24
24
import * as encoding from './encoding' ;
25
+ import * as helpers from './type-helpers' ;
25
26
26
27
/**
27
28
* Encode a UTF-8 string into a Uint8Array
@@ -42,3 +43,23 @@ export function u8(s: string): Uint8Array {
42
43
export function str ( arr : Uint8Array ) : string {
43
44
return encoding . decode ( arr ) ;
44
45
}
46
+
47
+ /**
48
+ * Get `error.message` (or `undefined` if not present)
49
+ *
50
+ * @hidden
51
+ * @deprecated - meant for internal use only
52
+ */
53
+ export function errorMessage ( error : unknown ) : string | undefined {
54
+ return helpers . errorMessage ( error ) ;
55
+ }
56
+
57
+ /**
58
+ * Get `error.code` (or `undefined` if not present)
59
+ *
60
+ * @hidden
61
+ * @deprecated - meant for internal use only
62
+ */
63
+ export function errorCode ( error : unknown ) : string | undefined {
64
+ return helpers . errorCode ( error ) ;
65
+ }
You can’t perform that action at this time.
0 commit comments