MCPcopy Create free account
hub / github.com/dailydotdev/apps / getExcoErrorMessage

Function getExcoErrorMessage

packages/shared/src/features/monetization/exco.ts:86–104  ·  view source on GitHub ↗
(
  data: ExcoEventData,
)

Source from the content-addressed store, hash-verified

84 * payload itself may carry the message or code.
85 */
86export const getExcoErrorMessage = (
87 data: ExcoEventData,
88): string | undefined => {
89 const details =
90 getLogErrorDetails(data.error) ??
91 getLogErrorDetails(data as Record<string, unknown>);
92
93 if (!details) {
94 return undefined;
95 }
96
97 const message = details.message ?? details.name;
98
99 if (details.code && message) {
100 return `${details.code}: ${message}`;
101 }
102
103 return message ?? details.code;
104};
105
106export type ExcoPlayerInstance = {
107 /** Every other call errors until the promise settles. */

Callers 2

toExcoFrameEventDataFunction · 0.90
errorExtraFunction · 0.90

Calls 1

getLogErrorDetailsFunction · 0.90

Tested by

no test coverage detected