Ghost/ghost/version-notifications-data-service
Daniel Lockyer 6c7b230efe Fixed handling requests with mismatching version and missing key
fix https://linear.app/tryghost/issue/SLO-88/typeerror-cannot-read-properties-of-null-reading-relations

- in the event that we make it through the version mismatch code, but
  without a key, which is possible if you send a request like POST
  /ghost/api/v2/content/posts/`, then the version mismatch code will try
  and look up the API key attached to a null key, which won't work
- we should handle this case and soft return, to avoid trying to read
  `.relations` from `null`
- I'm not entirely convinced by how this code works in general, it seems
  quite confusing to reason about, but this commit should solve the HTTP
  500 we've been seeing from this
- perhaps in the future we can return earlier in the flow if we receive
  a `null` key
2024-05-02 13:03:26 +02:00
..
lib Fixed handling requests with mismatching version and missing key 2024-05-02 13:03:26 +02:00
test Fixed handling requests with mismatching version and missing key 2024-05-02 13:03:26 +02:00
.eslintrc.js Added scaffolding for version notification data service 2022-04-22 14:47:18 +08:00
index.js Added eslint rule for file naming convention 2023-05-09 12:34:34 -04:00
package.json Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
README.md Tidied up package README and LICENSE files 2022-07-26 15:22:10 +02:00

Version Notifications Data Service

Package-service managing data for the version notification service