You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+164-1Lines changed: 164 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1243,10 +1243,160 @@ Example for `error.toHumanMessage()`:
1243
1243
1244
1244
> "NOPE" could not be matched with any of the existing field names: "My text", "My number", "My Date". If the field should be considered optional, then set it to "nope: { name: "NOPE", optional: true}
1245
1245
1246
-
#### `GitHubProjectUnknownFieldOptionError`
1246
+
#### `GitHubProjectInvalidValueError`
1247
1247
1248
1248
Thrown when attempting to set a single select project field to a value that is not included in the field's configured options.
> User value is incompatible with project field type
1309
+
1310
+
</td>
1311
+
<tr>
1312
+
<th>
1313
+
<code>details</code>
1314
+
</th>
1315
+
<td>
1316
+
<code>object</code>
1317
+
</td>
1318
+
<td>
1319
+
1320
+
Object with error details
1321
+
1322
+
</td>
1323
+
</tr>
1324
+
<tr>
1325
+
<th>
1326
+
<code>details.field</code>
1327
+
</th>
1328
+
<td>
1329
+
<code>object</code>
1330
+
</td>
1331
+
<td>
1332
+
1333
+
Object with field details
1334
+
1335
+
</td>
1336
+
</tr>
1337
+
<tr>
1338
+
<th>
1339
+
<code>details.field.id</code>
1340
+
</th>
1341
+
<td>
1342
+
<code>string</code>
1343
+
</td>
1344
+
<td>
1345
+
1346
+
`details.field.id` is the project field GraphQL node ID
1347
+
1348
+
</td>
1349
+
</tr>
1350
+
<tr>
1351
+
<th>
1352
+
<code>details.field.name</code>
1353
+
</th>
1354
+
<td>
1355
+
<code>string</code>
1356
+
</td>
1357
+
<td>
1358
+
1359
+
The field name as shown in the project
1360
+
1361
+
</td>
1362
+
</tr>
1363
+
<tr>
1364
+
<th>
1365
+
<code>details.field.type</code>
1366
+
</th>
1367
+
<td>
1368
+
<code>string</code>
1369
+
</td>
1370
+
<td>
1371
+
1372
+
Is always either `DATE`, `NUMBER`, or `SINGLE_SELECT`. If it's `SINGLE_SELECT`, then the error is a [`GitHubProjectUnknownFieldOptionError`](#githubprojectunknownfieldoptionerror).
1373
+
1374
+
</td>
1375
+
</tr>
1376
+
<tr>
1377
+
<th>
1378
+
<code>details.userValue</code>
1379
+
</th>
1380
+
<td>
1381
+
<code>string</code>
1382
+
</td>
1383
+
<td>
1384
+
1385
+
The stringified value set in the API call.
1386
+
1387
+
</td>
1388
+
</tr>
1389
+
</tbody>
1390
+
</table>
1391
+
1392
+
Example for `error.toHumanMessage()`:
1393
+
1394
+
> "unknown" is not compatible with the "My Date" project field
1395
+
1396
+
#### `GitHubProjectUnknownFieldOptionError`
1397
+
1398
+
Thrown when attempting to set a single select project field to a value that is not included in the field's configured options. Inherits from [`GitHubProjectInvalidValueError`](#githubprojectinvalidvalueerror).
super("User value is incompatible with project field type");
44
+
this.details=details;
45
+
}
46
+
47
+
toHumanMessage(){
48
+
return`"${this.details.userValue}" is not compatible with the "${this.details.field.name}" project field which expects a value of type "${this.details.field.type}"`;
0 commit comments