Comfy-Org / Comfy-Org/ComfyUI_frontend

Investigate non-string serverLogs: strengthen ErrorReportData type

Open
#11,272 0 comments 0 reactions 1 assignee Claimed by @pythongosssss View on GitHub
developer experience
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Background

During review of #11268 (regression test for #8460), it was noted that `ErrorReportData.serverLogs` is currently typed as `string` in `src/utils/errorReportUtil.ts`, but the production code already has a runtime guard:

```ts
typeof error.serverLogs === 'string' ? ... : JSON.stringify(...)
```

This indicates `serverLogs` can in practice be a non-string value (e.g., an object). Fixing the type was considered out of scope for #11268 which only adds regression tests.

## Task

- Investigate what server messages or conditions produce a non-string `serverLogs` value (e.g., object-shaped log entries).
- Determine the correct type (e.g., `unknown`, `string | object`, or a more precise schema).
- Update `ErrorReportData.serverLogs` to reflect the real type and remove any unsafe casts in call-sites.

## References

- PR: https://github.com/Comfy-Org/ComfyUI_frontend/pull/11268
- Review comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/11268#discussion_r3087889280

Requested by @pythongosssss

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11272-Investigate-non-string-serverLogs-strengthen-ErrorReportData-type-3436d73d36508199964dd838d29439dc) by [Unito](https://www.unito.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.