deconst / content-service

An API for storing, indexing and retrieving documentation
MIT License
4 stars 9 forks source link

latch call seems broken at es 6.2 #123

Closed nimbinatus closed 6 years ago

nimbinatus commented 6 years ago

When trying to use a 6.x ElasticSearch, getting an error regarding the latch call. 6.2 notes breaking changes with the returned value on error with incorrect-verb calls. Related?

Relevant code: https://github.com/deconst/content-service/blob/master/src/storage/remote.js#L31-L42 Relevant release note: https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_60_rest_changes.html#_requests_to_existing_endpoints_with_incorrect_http_verb_now_return_405_responses

cc: @robb-romans

nimbinatus commented 6 years ago
"stack":[
    "Error: Incorrect HTTP method for uri [/latch] and method [POST], allowed: [GET, DELETE, HEAD, PUT]",
    "    at respond (/usr/src/app/node_modules/elasticsearch/src/lib/transport.js:264:15)",
    "    at checkRespForFailure (/usr/src/app/node_modules/elasticsearch/src/lib/transport.js:223:7)",
    "    at HttpConnector.<anonymous> (/usr/src/app/node_modules/elasticsearch/src/lib/connectors/http.js:155:7)",
    "    at IncomingMessage.wrapper (/usr/src/app/node_modules/lodash/index.js:3095:19)",
    "    at emitNone (events.js:72:20)",
    "    at IncomingMessage.emit (events.js:166:7)",
    "    at endReadableNT (_stream_readable.js:905:12)",
    "    at nextTickCallbackWith2Args (node.js:437:9)",
    "    at process._tickCallback (node.js:351:17)"
  ],
  "level":"error",
  "message":"uncaughtException: Incorrect HTTP method for uri [/latch] and method [POST], allowed: [GET, DELETE, HEAD, PUT]"