Error List
A list of error classes that can occur in GASsma.
Search / Query Errors
| Error | Message | Trigger Condition |
|---|---|---|
GassmaFindSelectOmitConflictError | Cannot use both select and omit in the same query | select and omit are specified at the same time |
NotFoundError | An operation failed because it depends on one or more records that were required but not found. | No record found with findFirstOrThrow |
GassmaSkipNegativeError | Invalid value for skip argument: Value can only be positive, found: {value} | A negative number is specified for skip |
GassmaLimitNegativeError | Invalid value for limit argument: Value can only be positive, found: {value} | A negative number is specified for limit |
orderBy Errors
| Error | Message | Trigger Condition |
|---|---|---|
RelationOrderByUnsupportedTypeError | Cannot use orderBy on "{relationName}" (type: {relationType}). Only manyToOne and oneToOne are supported. | Field sort is used on a oneToMany / manyToMany relation |
RelationOrderByCountUnsupportedTypeError | Cannot use _count orderBy on "{relationName}" (type: {relationType}). Only oneToMany and manyToMany are supported. | _count sort is used on a manyToOne / oneToOne relation |
Aggregation Errors
| Error | Message | Trigger Condition |
|---|---|---|
GassmaAggregateMaxError | Cannot produce a maximum value of more than one type. | Mixed types in _max |
GassmaAggregateMinError | Cannot produce a maximum value of more than one type. | Mixed types in _min |
GassmaAggregateSumError | Cannot produce a maximum value of more than one type. | Non-numeric types mixed in _sum |
GassmaAggregateAvgError | Cannot produce a maximum value of more than one type. | Non-numeric types mixed in _avg |
GassmaAggregateTypeError | Only "number", "string", "boolean", and "Date" types are supported. | Unsupported type in _max / _min |
GassmaAggregateSumTypeError | Only "number" type is supported. | Non-numeric type in _sum |
GassmaAggregateAvgTypeError | Only "number" type is supported. | Non-numeric type in _avg |
groupBy Errors
| Error | Message | Trigger Condition |
|---|---|---|
GassmaGroupByHavingDontWriteByError | When 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
| Error | Message | Trigger Condition |
|---|---|---|
GassmaInValidColumnValueError | startColumnValue and endColumnValue can only use number, [a-z] and [A-Z]. | An invalid column value is specified in changeSettings |
Relation Definition Errors
| Error | Message | Trigger Condition |
|---|---|---|
RelationSheetNotFoundError | Sheet "{sheetName}" is not found in the spreadsheet | The sheet specified in the relation definition does not exist |
RelationMissingPropertyError | Relation "{relationName}" on sheet "{sheetName}" is missing required property "{property}" | A required property is missing in the relation definition |
RelationInvalidPropertyTypeError | Relation "{relationName}" on sheet "{sheetName}": property "{property}" must be a {expectedType} | The property type in the relation definition is invalid |
RelationInvalidTypeError | Relation "{relationName}" on sheet "{sheetName}": type "{value}" is not valid. Must be one of: oneToMany, oneToOne, manyToOne, manyToMany | The relation type is invalid |
RelationColumnNotFoundError | Column "{columnName}" is not found in sheet "{sheetName}" | The column specified in field / reference of the relation definition does not exist |
RelationInvalidOnDeleteError | Relation "{relationName}" on sheet "{sheetName}": onDelete "{value}" is not valid. Must be one of: Cascade, SetNull, Restrict, NoAction | The onDelete value is invalid |
RelationInvalidOnUpdateError | Relation "{relationName}" on sheet "{sheetName}": onUpdate "{value}" is not valid. Must be one of: Cascade, SetNull, Restrict, NoAction | The onUpdate value is invalid |
Relation Operation Errors
| Error | Message | Trigger Condition |
|---|---|---|
GassmaRelationNotFoundError | Relation "{relationName}" is not defined for sheet "{sheetName}" | An undefined relation name is specified in include |
GassmaRelationDuplicateError | Duplicate value "{value}" found in "{sheetName}.{field}" for a unique relation | Duplicate values exist in the target of a oneToOne / manyToOne relation |
GassmaThroughRequiredError | Relation "{relationName}" is manyToMany but "through" is not defined | through (junction table) is not defined for a manyToMany relation |
RelationOnDeleteRestrictError | Cannot delete: related records exist for relation "{relationName}" (onDelete: Restrict) | Attempting to delete when related records exist with onDelete: "Restrict" |
RelationOnUpdateRestrictError | Cannot update: related records exist for relation "{relationName}" (onUpdate: Restrict) | Attempting to update a PK when related records exist with onUpdate: "Restrict" |
include Errors
| Error | Message | Trigger Condition |
|---|---|---|
IncludeWithoutRelationsError | Cannot use include without defining relations in GassmaClient | include is used without defining relations |
GassmaIncludeSelectConflictError | Cannot use both include and select in the same query | include and select are used simultaneously at the top level |
IncludeInvalidOptionTypeError | Include "{relationName}": option "{option}" must be {expectedType} | The option value type in include is invalid |
IncludeSelectOmitConflictError | Include "{relationName}": cannot use both select and omit at the same time | select and omit are specified simultaneously within include |
IncludeSelectIncludeConflictError | Include "{relationName}": cannot use both select and include at the same time | select and include are specified simultaneously within include |
where Relation Filter Errors
| Error | Message | Trigger Condition |
|---|---|---|
WhereRelationInvalidFilterError | Filter "{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) |
WhereRelationWithoutContextError | Cannot use relation filters in where clause without defining relations | Relation filters are used without defining relations |
Nested Write Errors
| Error | Message | Trigger Condition |
|---|---|---|
NestedWriteWithoutRelationsError | Cannot use nested write operations without defining relations in GassmaClient | Nested Write is used without defining relations |
NestedWriteConnectNotFoundError | Nested write connect failed: no record found in "{sheetName}" | The target record is not found with connect / connectOrCreate |
NestedWriteRelationNotFoundError | Nested write failed: "{fieldName}" is not a defined relation | An undefined relation name is used in Nested Write |
NestedWriteInvalidOperationError | Nested 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) |