エラー一覧
GASsma で発生するエラークラスの一覧です。
検索・クエリ系
| エラー | メッセージ | 発生条件 |
|---|---|---|
GassmaFindSelectOmitConflictError | Cannot use both select and omit in the same query | select と omit を同時に指定 |
NotFoundError | An operation failed because it depends on one or more records that were required but not found. | findFirstOrThrow でレコードが見つからない |
GassmaSkipNegativeError | Invalid value for skip argument: Value can only be positive, found: {value} | skip に負数を指定 |
GassmaLimitNegativeError | Invalid value for limit argument: Value can only be positive, found: {value} | limit に負数を指定 |
orderBy 系
| エラー | メッセージ | 発生条件 |
|---|---|---|
RelationOrderByUnsupportedTypeError | Cannot use orderBy on "{relationName}" (type: {relationType}). Only manyToOne and oneToOne are supported. | oneToMany / manyToMany のリレーションでフィールドソートを使用 |
RelationOrderByCountUnsupportedTypeError | Cannot use _count orderBy on "{relationName}" (type: {relationType}). Only oneToMany and manyToMany are supported. | manyToOne / oneToOne のリレーションで _count ソートを使用 |
集計系
| エラー | メッセージ | 発生条件 |
|---|---|---|
GassmaAggregateMaxError | Cannot produce a maximum value of more than one type. | _max で異なる型が混在 |
GassmaAggregateMinError | Cannot produce a maximum value of more than one type. | _min で異なる型が混在 |
GassmaAggregateSumError | Cannot produce a maximum value of more than one type. | _sum で数値以外の型が混在 |
GassmaAggregateAvgError | Cannot produce a maximum value of more than one type. | _avg で数値以外の型が混在 |
GassmaAggregateTypeError | Only "number", "string", "boolean", and "Date" types are supported. | _max / _min でサポートされていない型 |
GassmaAggregateSumTypeError | Only "number" type is supported. | _sum で数値以外の型 |
GassmaAggregateAvgTypeError | Only "number" type is supported. | _avg で数値以外の型 |
groupBy 系
| エラー | メッセージ | 発生条件 |
|---|---|---|
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. | having で by に含まれないカラムを使用 |
設定系
| エラー | メッセージ | 発生条件 |
|---|---|---|
GassmaInValidColumnValueError | startColumnValue and endColumnValue can only use number, [a-z] and [A-Z]. | changeSettings に無効な列値を指定 |
リレーション定義系
| エラー | メッセージ | 発生条件 |
|---|---|---|
RelationSheetNotFoundError | Sheet "{sheetName}" is not found in the spreadsheet | リレーション定義のシートが存在しない |
RelationMissingPropertyError | Relation "{relationName}" on sheet "{sheetName}" is missing required property "{property}" | リレーション定義の必須プロパティが欠落 |
RelationInvalidPropertyTypeError | Relation "{relationName}" on sheet "{sheetName}": property "{property}" must be a {expectedType} | リレーション定義のプロパティの型が不正 |
RelationInvalidTypeError | Relation "{relationName}" on sheet "{sheetName}": type "{value}" is not valid. Must be one of: oneToMany, oneToOne, manyToOne, manyToMany | リレーションの type が無効 |
RelationColumnNotFoundError | Column "{columnName}" is not found in sheet "{sheetName}" | リレーション定義の field / reference のカラムが存在しない |
RelationInvalidOnDeleteError | Relation "{relationName}" on sheet "{sheetName}": onDelete "{value}" is not valid. Must be one of: Cascade, SetNull, Restrict, NoAction | onDelete の値が無効 |
RelationInvalidOnUpdateError | Relation "{relationName}" on sheet "{sheetName}": onUpdate "{value}" is not valid. Must be one of: Cascade, SetNull, Restrict, NoAction | onUpdate の値が無効 |
リレーション操作系
| エラー | メッセージ | 発生条件 |
|---|---|---|
GassmaRelationNotFoundError | Relation "{relationName}" is not defined for sheet "{sheetName}" | include で未定義のリレーション名を指定 |
GassmaRelationDuplicateError | Duplicate value "{value}" found in "{sheetName}.{field}" for a unique relation | oneToOne / manyToOne でリレーション先に重複値が存在 |
GassmaThroughRequiredError | Relation "{relationName}" is manyToMany but "through" is not defined | manyToMany で through(中間テーブル)が未定義 |
RelationOnDeleteRestrictError | Cannot delete: related records exist for relation "{relationName}" (onDelete: Restrict) | onDelete: "Restrict" 設定時に関連レコードが存在する状態で削除 |
RelationOnUpdateRestrictError | Cannot update: related records exist for relation "{relationName}" (onUpdate: Restrict) | onUpdate: "Restrict" 設定時に関連レコードが存在する状態で PK を更新 |
include 系
| エラー | メッセージ | 発生条件 |
|---|---|---|
IncludeWithoutRelationsError | Cannot use include without defining relations in GassmaClient | リレーション定義なしで include を使用 |
GassmaIncludeSelectConflictError | Cannot use both include and select in the same query | トップレベルで include と select を同時使用 |
IncludeInvalidOptionTypeError | Include "{relationName}": option "{option}" must be {expectedType} | include のオプション値の型が不正 |
IncludeSelectOmitConflictError | Include "{relationName}": cannot use both select and omit at the same time | include 内で select と omit を同時指定 |
IncludeSelectIncludeConflictError | Include "{relationName}": cannot use both select and include at the same time | include 内で select と include を同時指定 |
where リレーションフィルタ系
| エラー | メッセージ | 発生条件 |
|---|---|---|
WhereRelationInvalidFilterError | Filter "{filterType}" cannot be used on relation "{relationName}" of type "{relationType}" | リレーション型に不適切なフィルタを使用(例: oneToMany に is を使用) |
WhereRelationWithoutContextError | Cannot use relation filters in where clause without defining relations | リレーション定義なしでリレーションフィルタを使用 |
Nested Write 系
| エラー | メッセージ | 発生条件 |
|---|---|---|
NestedWriteWithoutRelationsError | Cannot use nested write operations without defining relations in GassmaClient | リレーション定義なしで Nested Write を使用 |
NestedWriteConnectNotFoundError | Nested write connect failed: no record found in "{sheetName}" | connect / connectOrCreate で対象レコードが見つからない |
NestedWriteRelationNotFoundError | Nested write failed: "{fieldName}" is not a defined relation | Nested Write で未定義のリレーション名を使用 |
NestedWriteInvalidOperationError | Nested write: operation "{operation}" is not valid for relation "{relationName}" of type "{relationType}" | リレーション型に非対応の操作を使用(例: manyToMany に delete を使用) |