HyunsDev / opize-calendar2notion-syncbot

Calendar2notion 동기화봇
0 stars 0 forks source link

Notion API 400 - validation_error #5

Closed HyunsDev closed 1 year ago

HyunsDev commented 1 year ago

Error

Detail

{
  "body": "{\"object\":\"error\",\"status\":400,\"code\":\"validation_error\",\"message\":\"cK`O is an invalid select option \\\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\\\".\"}",
  "status": 400,
  "code": "validation_error"
}

Stack

Error: 노션 API 잘못된 요청
    at handleNotionHandlerErrors (/var/www/opize-calendar2notion-syncbot/dist/src/module/worker/assist/notionAssist/api.decorator.js:11:15)
    at desc.value (/var/www/opize-calendar2notion-syncbot/dist/src/module/worker/assist/notionAssist/api.decorator.js:81:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async NotionAssist.CUDPage (/var/www/opize-calendar2notion-syncbot/dist/src/module/worker/assist/notionAssist/index.js:91:26)
    at async Worker.syncEvents (/var/www/opize-calendar2notion-syncbot/dist/src/module/worker/index.js:123:17)
    at async Worker.runSteps (/var/www/opize-calendar2notion-syncbot/dist/src/module/worker/index.js:73:13)
    at async timeout (/var/www/opize-calendar2notion-syncbot/dist/src/utils/timeout.js:19:12)
    at async Worker.runStepsWithTimeout (/var/www/opize-calendar2notion-syncbot/dist/src/module/worker/index.js:54:13)
    at async Worker.run (/var/www/opize-calendar2notion-syncbot/dist/src/module/worker/index.js:25:13)
    at async UserLoop.runWorker (/var/www/opize-calendar2notion-syncbot/dist/src/module/runner/loop.js:27:21)

추정 원인

노션 createPage 단계에서 이벤트에 해당하는 Calendar 속성을 찾지 못하여 발생하는 것으로 추정

해결

Calendar Option을 id로 가져오는 방식에서 name으로 가져오는 방식으로 변경