iflytek/astron-agent · error · Error
onCustomSignParam.getHeader is not a object
Error message
onCustomSignParam.getHeader is not a object
What it means
Second variant of the getHeader check: thrown on a different code path when onCustomSignParam.getHeader is not an object at all (the type check fails before the toString check). Same contract violation — the app's header hook did not return a plain object.
Solutions
- Ensure getHeader is defined and returns a plain object
- Handle the case where getHeader is omitted — provide defaults
- Add a type check on the SDK config before initialization
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at console/frontend/src/utils/avatar-sdk-web_3.1.2.1002/xrtc-player-BJTnVhG9.js:12877 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/60fa0e711d3a4190.
Report an issue: GitHub.
Appendix: source
Thrown at console/frontend/src/utils/avatar-sdk-web_3.1.2.1002/xrtc-player-BJTnVhG9.js:12877
}
return t.abrupt(
'return',
new Headers(
Ei(
{ 'Content-Type': 'application/json', appKey: e.appKey },
r
)
)
);
case 12:
throw new Error(
'onCustomSignParam.getHeader result is not an object'
);
case 13:
t.next = 16;
break;
case 15:
throw new Error('onCustomSignParam.getHeader is not a object');
case 16:
t.next = 19;
break;
case 18:
return t.abrupt(
'return',
new Headers({
'Content-Type': 'application/json',
appKey: e.appKey,
Authorization: e.authorization,
userId: e.userId,
})
);
case 19:
case 'end':
return t.stop();
}
}, t);View on GitHub (pinned to 5e758547a8)