Hello, {{person.firstName}}!
\n @fields.boomPerson>\n\n```", + "cardInfo": { + "name": null, + "notes": null, + "summary": null, + "cardThumbnailURL": null + }, + "specType": "card", + "cardTitle": "Boom Person", + "cardDescription": null, + "containedExamples": [] + }, + "relationships": { + "cardInfo.theme": { + "links": { + "self": null + } + }, + "linkedExamples": { + "links": { + "self": null + } + } + } + } +} \ No newline at end of file diff --git a/boom-pet.gts b/boom-pet.gts new file mode 100644 index 0000000..303124f --- /dev/null +++ b/boom-pet.gts @@ -0,0 +1,62 @@ +import { + contains, + field, + CardDef, + Component, + FieldDef, + StringField, + serialize, +} from 'https://cardstack.com/base/card-api'; + +// this field explodes when serialized (saved) +export class BoomField extends FieldDef { + @field cardTitle = contains(StringField); + static [serialize](_boom: any) { + throw new Error('Boom!'); + } + static embedded = class Embedded extends ComponentI am not broken!
+ + }; +} + +export class FailingField extends FieldDef { + static displayName = 'Failing Field'; + @field cardTitle = contains(StringField); + static embedded = class Embedded extends ComponentThis will fail.
{{this.boom}} + + boom = () => { + throw new Error('boom!'); + }; + }; +}