Skip to main content

Error List

A list of error classes that can occur in GASsma.

Search / Query Errors

ErrorMessageTrigger Condition
GassmaFindSelectOmitConflictErrorCannot use both select and omit in the same queryselect and omit are specified at the same time
NotFoundErrorAn operation failed because it depends on one or more records that were required but not found.No record found with findFirstOrThrow
GassmaSkipNegativeErrorInvalid value for skip argument: Value can only be positive, found: {value}A negative number is specified for skip
GassmaLimitNegativeErrorInvalid value for limit argument: Value can only be positive, found: {value}A negative number is specified for limit

orderBy Errors

ErrorMessageTrigger Condition
RelationOrderByUnsupportedTypeErrorCannot use orderBy on "{relationName}" (type: {relationType}). Only manyToOne and oneToOne are supported.Field sort is used on a oneToMany / manyToMany relation
RelationOrderByCountUnsupportedTypeErrorCannot use _count orderBy on "{relationName}" (type: {relationType}). Only oneToMany and manyToMany are supported._count sort is used on a manyToOne / oneToOne relation

Aggregation Errors

ErrorMessageTrigger Condition
GassmaAggregateMaxErrorCannot produce a maximum value of more than one type.Mixed types in _max
GassmaAggregateMinErrorCannot produce a maximum value of more than one type.Mixed types in _min
GassmaAggregateSumErrorCannot produce a maximum value of more than one type.Non-numeric types mixed in _sum
GassmaAggregateAvgErrorCannot produce a maximum value of more than one type.Non-numeric types mixed in _avg
GassmaAggregateTypeErrorOnly "number", "string", "boolean", and "Date" types are supported.Unsupported type in _max / _min
GassmaAggregateSumTypeErrorOnly "number" type is supported.Non-numeric type in _sum
GassmaAggregateAvgTypeErrorOnly "number" type is supported.Non-numeric type in _avg

groupBy Errors

ErrorMessageTrigger Condition
GassmaGroupByHavingDontWriteByErrorWhen using "having" other than "_avg", "_count", "_max", "_min", and "_sum", column names can be used only if they are written in the "by" field.A column not included in by is used in having

Configuration Errors

ErrorMessageTrigger Condition
GassmaInValidColumnValueErrorstartColumnValue and endColumnValue can only use number, [a-z] and [A-Z].An invalid column value is specified in changeSettings

Relation Definition Errors

ErrorMessageTrigger Condition
RelationSheetNotFoundErrorSheet "{sheetName}" is not found in the spreadsheetThe sheet specified in the relation definition does not exist
RelationMissingPropertyErrorRelation "{relationName}" on sheet "{sheetName}" is missing required property "{property}"A required property is missing in the relation definition
RelationInvalidPropertyTypeErrorRelation "{relationName}" on sheet "{sheetName}": property "{property}" must be a {expectedType}The property type in the relation definition is invalid
RelationInvalidTypeErrorRelation "{relationName}" on sheet "{sheetName}": type "{value}" is not valid. Must be one of: oneToMany, oneToOne, manyToOne, manyToManyThe relation type is invalid
RelationColumnNotFoundErrorColumn "{columnName}" is not found in sheet "{sheetName}"The column specified in field / reference of the relation definition does not exist
RelationInvalidOnDeleteErrorRelation "{relationName}" on sheet "{sheetName}": onDelete "{value}" is not valid. Must be one of: Cascade, SetNull, Restrict, NoActionThe onDelete value is invalid
RelationInvalidOnUpdateErrorRelation "{relationName}" on sheet "{sheetName}": onUpdate "{value}" is not valid. Must be one of: Cascade, SetNull, Restrict, NoActionThe onUpdate value is invalid

Relation Operation Errors

ErrorMessageTrigger Condition
GassmaRelationNotFoundErrorRelation "{relationName}" is not defined for sheet "{sheetName}"An undefined relation name is specified in include
GassmaRelationDuplicateErrorDuplicate value "{value}" found in "{sheetName}.{field}" for a unique relationDuplicate values exist in the target of a oneToOne / manyToOne relation
GassmaThroughRequiredErrorRelation "{relationName}" is manyToMany but "through" is not definedthrough (junction table) is not defined for a manyToMany relation
RelationOnDeleteRestrictErrorCannot delete: related records exist for relation "{relationName}" (onDelete: Restrict)Attempting to delete when related records exist with onDelete: "Restrict"
RelationOnUpdateRestrictErrorCannot update: related records exist for relation "{relationName}" (onUpdate: Restrict)Attempting to update a PK when related records exist with onUpdate: "Restrict"

include Errors

ErrorMessageTrigger Condition
IncludeWithoutRelationsErrorCannot use include without defining relations in GassmaClientinclude is used without defining relations
GassmaIncludeSelectConflictErrorCannot use both include and select in the same queryinclude and select are used simultaneously at the top level
IncludeInvalidOptionTypeErrorInclude "{relationName}": option "{option}" must be {expectedType}The option value type in include is invalid
IncludeSelectOmitConflictErrorInclude "{relationName}": cannot use both select and omit at the same timeselect and omit are specified simultaneously within include
IncludeSelectIncludeConflictErrorInclude "{relationName}": cannot use both select and include at the same timeselect and include are specified simultaneously within include

where Relation Filter Errors

ErrorMessageTrigger Condition
WhereRelationInvalidFilterErrorFilter "{filterType}" cannot be used on relation "{relationName}" of type "{relationType}"An inappropriate filter is used for the relation type (e.g., using is on a oneToMany relation)
WhereRelationWithoutContextErrorCannot use relation filters in where clause without defining relationsRelation filters are used without defining relations

Nested Write Errors

ErrorMessageTrigger Condition
NestedWriteWithoutRelationsErrorCannot use nested write operations without defining relations in GassmaClientNested Write is used without defining relations
NestedWriteConnectNotFoundErrorNested write connect failed: no record found in "{sheetName}"The target record is not found with connect / connectOrCreate
NestedWriteRelationNotFoundErrorNested write failed: "{fieldName}" is not a defined relationAn undefined relation name is used in Nested Write
NestedWriteInvalidOperationErrorNested write: operation "{operation}" is not valid for relation "{relationName}" of type "{relationType}"An unsupported operation is used for the relation type (e.g., using delete on a manyToMany relation)