Skip to content

assert_content_within_limit

Function: warmhub.assert_content_within_limit

assert_content_within_limit(field_label: str, value: object)

Refuse a content field that exceeds the canonical byte limit.

A non-string returns without complaint, exactly as the TypeScript does. The limit is a limit on bytes, and a caller who hands this a non-string has a different problem that shape validation reports with a better message.