Skip to content

Conversation

DevinDon
Copy link

@DevinDon DevinDon commented Sep 27, 2025

  • 在其他适配器中有关于请求头的合并代码,如默认的 http 模块适配器
  • 如果自定义适配器未合并请求头到 headers 字段,会导致 checkIsEventValidated 函数抛出错误,类似 Issue #135 提到的 Cannot destructure property 'x-lark-request-timestamp' of 'data.headers' as it is undefined
  • 避免解构赋值导致的 Verification Failed 错误,见 Issue #46

@DevinDon
Copy link
Author

顺便问一嘴,是不是只有飞书支持长连接模式处理事件?我看 Lark 提示 404 好像没部署相关服务。

@DevinDon DevinDon force-pushed the docs/fix-adapter-usage branch from cab0e96 to c371700 Compare September 27, 2025 15:23
- 在其他适配器中有关于请求头的合并代码,如默认的 [http 模块适配器](https://github.com/larksuite/node-sdk/blob/main/adaptor/default.ts#L20)
- 如果自定义适配器未合并请求头到 `headers` 字段,会导致 [`checkIsEventValidated` 函数抛出错误](https://github.com/larksuite/node-sdk/blob/main/dispatcher/request-handle.ts#L108),类似 [Issue larksuite#135](larksuite#135) 提到的 `Cannot destructure property 'x-lark-request-timestamp' of 'data.headers' as it is undefined`
- 避免解构赋值导致的 Verification Failed 错误,见 [Issue larksuite#46](larksuite#46 (comment))
@DevinDon DevinDon force-pushed the docs/fix-adapter-usage branch from c371700 to 0627c7e Compare September 27, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant