hibiyasleep / calcium

fetch/parse school meals list from goverment.
9 stars 2 forks source link

일부 학교에 대해 에러 발생 #12

Open Hoto-Cocoa opened 5 years ago

Hoto-Cocoa commented 5 years ago

경기, 교find Method를 사용할 시 다음과 같은 에러가 발생합니다.

[REMOVED]\node_modules\calcium\src\find.js:22
    const foundData = body.resultSVO.orgDVOList
                                     ^

TypeError: Cannot read property 'orgDVOList' of undefined
    at Request.request [as _callback] ([REMOVED]\node_modules\calcium\src\find.js:22:38)
    at Request.self.callback ([REMOVED]\node_modules\request\request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> ([REMOVED]\node_modules\request\request.js:1161:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> ([REMOVED]\node_modules\request\request.js:1083:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

제주, 제주대학교사범대학부설중학교find Method를 사용한 결과값으로 get Method를 사용할 시 다음과 같은 에러가 발생합니다.

[REMOVED]\node_modules\calcium\src\get.js:13
    throw new TypeError('Invalid or unknown code: '+ school)
    ^

TypeError: Invalid or unknown code: A000003567
    at Object.fetchSchoolMeal [as get] ([REMOVED]\node_modules\calcium\src\get.js:13:11)
    at calcium.find ([REMOVED])
    at Request.request [as _callback] ([REMOVED]\node_modules\calcium\src\find.js:30:12)
    at Request.self.callback ([REMOVED]\node_modules\request\request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> ([REMOVED]\node_modules\request\request.js:1161:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> ([REMOVED]\node_modules\request\request.js:1083:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

find Method를 사용한 결과 값은 다음과 같습니다.

[ { name: '제주대학교사범대학부설중학교',
    code: 'A000003567',
    type: '중학교',
    address: '제주특별자치도 제주시 용담삼동' } ]

광주, 운남 등으로 find Method를 사용할 시 unable to verify the first certificate 에러가 발생합니다.

Hoto-Cocoa commented 5 years ago

1번째 문제는 검색어 길이가 너무 짧아 에러가 나는 것으로 예상되고, 2번째 문제는 A로 시작하는 학교 코드에 대한 정보가 없어 발생하는 문제 같습니다.

Hoto-Cocoa commented 5 years ago

Add: unable to verify the first certificate는 아마 GPKI 문제일 것 같습니다(본 레포에서 해결 할 수 없어보입니다).

hibiyasleep commented 5 years ago

1번째 문제를 좀 보니까 정상적 접근에 대해선 에러가 딱히 발생하지 않는 것 같네요... User-Agent를 먹여도 비슷한 것 같습니다;

Hoto-Cocoa commented 5 years ago

첨부해주신 링크를 보았으나 저는 어떤 검색어를 넣어도 결과가 나오지 않네요 🤔

2018년 12월 28일 (금) 18:16에 Kuriyama hibiya notifications@github.com님이 작성:

1번째 문제를 좀 보니까 정상적 접근 https://stu.goe.go.kr/popup.jsp?page=/ws/edusys/cm/sym/ocm/oi/sym_ocmoi_m01&popupID=20181228133335&w2xHome=/ws/edusys/pa/com/&w2xDocumentRoot=에 대해선 에러가 딱히 발생하지 않는 것 같네요... User-Agent를 먹여도 비슷한 것 같습니다;

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hibiyasleep/calcium/issues/12#issuecomment-450324094, or mute the thread https://github.com/notifications/unsubscribe-auth/AU88Euj7ulBMFKAQxNLm3hjdHnxP466Kks5u9eGHgaJpZM4YT1LB .

hibiyasleep commented 5 years ago

🤔 이상하네요... 시간날때 더 알아보겠습니다 ㅠ

Hoto-Cocoa commented 5 years ago

바쁘실텐데 신경써주셔서 감사합니다 😊

2019년 1월 8일 (화) 12:21에 Kuriyama hibiya notifications@github.com님이 작성:

🤔 이상하네요... 시간날때 더 알아보겠습니다 ㅠ

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hibiyasleep/calcium/issues/12#issuecomment-452161833, or mute the thread https://github.com/notifications/unsubscribe-auth/AU88EtIaxRaXCX19NHP8SvWarvwlZ44Mks5vBA6tgaJpZM4YT1LB .