yikart/AiToEarn · warning · AppException
ChannelPlatformOperationNotSupported
ChannelPlatformOperationNotSupported
Error message
ChannelPlatformOperationNotSupported
What it means
ChannelPlatformOperationNotSupported is thrown by PinterestPublishOptionsProvider.getValues when asked for dynamic option values of a field other than 'boardId'. Pinterest only supports boards as a dynamic publish option, so any other field has no value-listing operation.
Source
Thrown at project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/pinterest/pinterest-publish-options.provider.ts:31
@Injectable()
export class PinterestPublishOptionsProvider implements PublishOptionSourceProvider {
constructor(private readonly pinterestService: PinterestService) {}
listSources() {
return [{
field: 'boardId',
label: 'Board',
description: 'Pinterest board used as the Pin publish target',
valueType: PublishOptionValueType.List,
requiresAccount: true,
createSchema: PinterestBoardCreateSchema,
}]
}
async getValues(input: PublishOptionValuesInput): Promise<PublishOptionValuesResult> {
if (input.field !== 'boardId') {
throw new AppException(ResponseCode.ChannelPlatformOperationNotSupported, {
platform: AccountType.Pinterest,
field: input.field,
})
}
const boards = await this.pinterestService.listBoards(input.credential.accessToken)
return {
field: 'boardId',
valueType: PublishOptionValueType.List,
items: boards
.filter(board => Boolean(board.id))
.map(board => this.toItem(board)),
}
}
async createValue(input: PublishOptionCreateInput): Promise<PublishOptionCreateResult> {
if (input.field !== 'boardId') {View on GitHub (pinned to d3aa8bea5b)
Solutions
- Only call getValues with field === 'boardId' for Pinterest channels
- Fix the client to map fields from the provider's getOptions() schema instead of hardcoding field names
- If a new dynamic field is needed, extend the provider to handle it explicitly
Example fix
// before
await provider.getValues({ field: 'boardName', credential }) // throws
// after
await provider.getValues({ field: 'boardId', credential }) Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_PINTEREST_VALUE_FIELDS = ['boardId']
if (!SUPPORTED_PINTEREST_VALUE_FIELDS.includes(input.field)) {
throw new Error(`Pinterest supports dynamic values only for boardId, got ${input.field}`)
}
await provider.getValues(input) Type guard
function isPinterestValueField(f: string): f is 'boardId' {
return f === 'boardId'
} Try / catch
try {
values = await provider.getValues(input)
} catch (e) {
if (e instanceof AppException && e.code === ResponseCode.ChannelPlatformOperationNotSupported) {
values = [] // no dynamic values for this field on Pinterest
} else throw e
} Prevention
- Derive field names from getOptions()/schema instead of hardcoding
- Branch per-platform before calling dynamic value APIs
- Only offer board pickers on Pinterest channels in the UI
When it happens
Trigger: Calling getValues({ field: '<anything-other-than-boardId>', credential, ... }) — e.g. a client UI requesting values for a field the Pinterest platform never registered as dynamic.
Common situations: Frontend publishing dialog built generically across platforms requesting values for a stale or platform-mismatched field name; schema changed so field key no longer 'boardId'.
Related errors
- ChannelPlatformOperationNotSupported
- ChannelPlatformOperationNotSupported
- ChannelAuthRefreshTokenMissing
- ChannelPlatformMediaProcessingFailed
- InvalidWorkLink
AI-assisted analysis of yikart/AiToEarn@d3aa8bea5b (2026-08-31).
Data as JSON: /api/errors/553a8f08a1cccff5.
Report an issue: GitHub.