CrossRef/rest-api-doc

Searching for directory:DOAJ results in NullPointerException

elya5 opened this issue · 1 comments

elya5 commented

Hi,

when checking for articles listed in the DOAJ with the request https://api.crossref.org/works?filter=directory:DOAJ , I get the following exception:

{
  "status": "error",
  "message-type": "exception",
  "message-version": "1.0.0",
  "message": {
    "name": "class java.lang.NullPointerException",
    "description": "java.lang.NullPointerException: Cannot invoke \"clojure.lang.IFn.invoke(Object)\" because the return value of \"clojure.lang.IFn.invoke(Object)\" is null",
    "message": "Cannot invoke \"clojure.lang.IFn.invoke(Object)\" because the return value of \"clojure.lang.IFn.invoke(Object)\" is null",
    "stack": [
      "cayenne.api.v1.query$with_filters$fn__22715.invoke(query.clj:238)",
      "clojure.core$map$fn__4785.invoke(core.clj:2646)",
      "clojure.lang.LazySeq.sval(LazySeq.java:40)",
      "clojure.lang.LazySeq.seq(LazySeq.java:49)",
      "clojure.lang.RT.seq(RT.java:521)",
      "clojure.core$seq__4357.invokeStatic(core.clj:137)",
      "clojure.core$seq__4357.invoke(core.clj:137)",
      "clojure.core$tree_seq$walk__5273$fn__5274.invoke(core.clj:4763)",
      "clojure.lang.LazySeq.sval(LazySeq.java:40)",
      "clojure.lang.LazySeq.seq(LazySeq.java:49)",
      "clojure.lang.LazySeq.more(LazySeq.java:85)",
      "clojure.lang.RT.more(RT.java:697)",
      "clojure.core$rest__4343.invokeStatic(core.clj:73)",
      "clojure.core$flatten.invokeStatic(core.clj:6850)",
      "clojure.core$flatten.invoke(core.clj:6850)",
      "cayenne.api.v1.query$with_filters.invokeStatic(query.clj:238)",
      "cayenne.api.v1.query$with_filters.doInvoke(query.clj:237)",
      "clojure.lang.RestFn.invoke(RestFn.java:464)",
      "cayenne.api.v1.query$with_query.invokeStatic(query.clj:268)",
      "cayenne.api.v1.query$with_query.doInvoke(query.clj:251)",
      "clojure.lang.RestFn.invoke(RestFn.java:521)",
      "cayenne.api.v1.query$__GT_es_request.invokeStatic(query.clj:345)",
      "cayenne.api.v1.query$__GT_es_request.doInvoke(query.clj:328)",
      "clojure.lang.RestFn.invoke(RestFn.java:486)",
      "cayenne.data.work$fetch_data_async.invokeStatic(work.clj:123)",
      "cayenne.data.work$fetch_data_async.doInvoke(work.clj:122)",
      "clojure.lang.RestFn.invoke(RestFn.java:464)",
      "cayenne.data.work$fetch_async.invokeStatic(work.clj:264)",
      "cayenne.data.work$fetch_async.doInvoke(work.clj:261)",
      "clojure.lang.RestFn.invoke(RestFn.java:425)",
      "cayenne.api.v1.routes$works_resource$fn__30270.invoke(routes.clj:205)",
      "liberator.core$run_handler.invokeStatic(core.clj:176)",
      "liberator.core$run_handler.invoke(core.clj:131)",
      "liberator.core$handle_ok.invokeStatic(core.clj:224)",
      "liberator.core$handle_ok.invoke(core.clj:224)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$multiple_representations_QMARK_.invokeStatic(core.clj:232)",
      "liberator.core$multiple_representations_QMARK_.invoke(core.clj:232)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$put_to_existing_QMARK_.invokeStatic(core.clj:305)",
      "liberator.core$put_to_existing_QMARK_.invoke(core.clj:305)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$post_to_existing_QMARK_.invokeStatic(core.clj:308)",
      "liberator.core$post_to_existing_QMARK_.invoke(core.clj:308)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$method_patch_QMARK_.invokeStatic(core.clj:315)",
      "liberator.core$method_patch_QMARK_.invoke(core.clj:315)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$method_delete_QMARK_.invokeStatic(core.clj:317)",
      "liberator.core$method_delete_QMARK_.invoke(core.clj:317)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$if_modified_since_exists_QMARK_.invokeStatic(core.clj:337)",
      "liberator.core$if_modified_since_exists_QMARK_.invoke(core.clj:337)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$if_none_match_exists_QMARK_.invokeStatic(core.clj:355)",
      "liberator.core$if_none_match_exists_QMARK_.invoke(core.clj:355)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$if_unmodified_since_exists_QMARK_.invokeStatic(core.clj:375)",
      "liberator.core$if_unmodified_since_exists_QMARK_.invoke(core.clj:375)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$if_match_exists_QMARK_.invokeStatic(core.clj:389)",
      "liberator.core$if_match_exists_QMARK_.invoke(core.clj:389)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$exists_QMARK_.invokeStatic(core.clj:392)",
      "liberator.core$exists_QMARK_.invoke(core.clj:392)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$processable_QMARK_.invokeStatic(core.clj:395)",
      "liberator.core$processable_QMARK_.invoke(core.clj:395)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$encoding_available_QMARK_.invokeStatic(core.clj:399)",
      "liberator.core$encoding_available_QMARK_.invoke(core.clj:399)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$accept_encoding_exists_QMARK_.invokeStatic(core.clj:416)",
      "liberator.core$accept_encoding_exists_QMARK_.invoke(core.clj:416)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$accept_charset_exists_QMARK_.invokeStatic(core.clj:429)",
      "liberator.core$accept_charset_exists_QMARK_.invoke(core.clj:429)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$language_available_QMARK_.invokeStatic(core.clj:433)",
      "liberator.core$language_available_QMARK_.invoke(core.clj:433)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$accept_language_exists_QMARK_.invokeStatic(core.clj:443)",
      "liberator.core$accept_language_exists_QMARK_.invoke(core.clj:443)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$media_type_available_QMARK_.invokeStatic(core.clj:453)",
      "liberator.core$media_type_available_QMARK_.invoke(core.clj:453)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$accept_exists_QMARK_.invokeStatic(core.clj:456)",
      "liberator.core$accept_exists_QMARK_.invoke(core.clj:456)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$is_options_QMARK_.invokeStatic(core.clj:473)",
      "liberator.core$is_options_QMARK_.invoke(core.clj:473)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$valid_entity_length_QMARK_.invokeStatic(core.clj:476)",
      "liberator.core$valid_entity_length_QMARK_.invoke(core.clj:476)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$known_content_type_QMARK_.invokeStatic(core.clj:479)",
      "liberator.core$known_content_type_QMARK_.invoke(core.clj:479)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$valid_content_header_QMARK_.invokeStatic(core.clj:481)",
      "liberator.core$valid_content_header_QMARK_.invoke(core.clj:481)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$allowed_QMARK_.invokeStatic(core.clj:484)",
      "liberator.core$allowed_QMARK_.invoke(core.clj:484)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$authorized_QMARK_.invokeStatic(core.clj:487)",
      "liberator.core$authorized_QMARK_.invoke(core.clj:487)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$malformed_QMARK_.invokeStatic(core.clj:490)",
      "liberator.core$malformed_QMARK_.invoke(core.clj:490)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$method_allowed_QMARK_.invokeStatic(core.clj:493)",
      "liberator.core$method_allowed_QMARK_.invoke(core.clj:493)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$uri_too_long_QMARK_.invokeStatic(core.clj:496)",
      "liberator.core$uri_too_long_QMARK_.invoke(core.clj:496)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$known_method_QMARK_.invokeStatic(core.clj:499)",
      "liberator.core$known_method_QMARK_.invoke(core.clj:499)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$service_available_QMARK_.invokeStatic(core.clj:502)",
      "liberator.core$service_available_QMARK_.invoke(core.clj:502)",
      "liberator.core$decide.invokeStatic(core.clj:87)",
      "liberator.core$decide.invoke(core.clj:74)",
      "liberator.core$initialize_context.invokeStatic(core.clj:504)",
      "liberator.core$initialize_context.invoke(core.clj:504)",
      "liberator.core$run_resource.invokeStatic(core.clj:595)",
      "liberator.core$run_resource.invoke(core.clj:593)",
      "cayenne.api.v1.routes$works_resource.invokeStatic(routes.clj:193)",
      "cayenne.api.v1.routes$works_resource.invoke(routes.clj:193)",
      "compojure.response$eval29594$fn__29595.invoke(response.clj:47)",
      "compojure.response$eval29516$fn__29517$G__29507__29524.invoke(response.clj:7)",
      "compojure.core$wrap_response$fn__30066.invoke(core.clj:158)",
      "compojure.core$pre_init$fn__30163.invoke(core.clj:328)",
      "cayenne.api.auth.token$wrap_auth_when_enabled$fn__35015.invoke(token.clj:42)",
      "compojure.core$pre_init$fn__30165$fn__30168.invoke(core.clj:335)",
      "compojure.core$wrap_route_middleware$fn__30050.invoke(core.clj:127)",
      "compojure.core$wrap_route_info$fn__30055.invoke(core.clj:137)",
      "compojure.core$wrap_route_matches$fn__30059.invoke(core.clj:146)",
      "compojure.core$routing$fn__30074.invoke(core.clj:185)",
      "clojure.core$some.invokeStatic(core.clj:2592)",
      "clojure.core$some.invoke(core.clj:2583)",
      "compojure.core$routing.invokeStatic(core.clj:185)",
      "compojure.core$routing.doInvoke(core.clj:182)",
      "clojure.lang.RestFn.applyTo(RestFn.java:139)",
      "clojure.core$apply.invokeStatic(core.clj:648)",
      "clojure.core$apply.invoke(core.clj:641)",
      "compojure.core$routes$fn__30078.invoke(core.clj:192)",
      "compojure.core$routing$fn__30074.invoke(core.clj:185)",
      "clojure.core$some.invokeStatic(core.clj:2592)",
      "clojure.core$some.invoke(core.clj:2583)",
      "compojure.core$routing.invokeStatic(core.clj:185)",
      "compojure.core$routing.doInvoke(core.clj:182)",
      "clojure.lang.RestFn.applyTo(RestFn.java:139)",
      "clojure.core$apply.invokeStatic(core.clj:648)",
      "clojure.core$apply.invoke(core.clj:641)",
      "compojure.core$routes$fn__30078.invoke(core.clj:192)",
      "compojure.core$wrap_routes$fn__30175.invoke(core.clj:348)",
      "compojure.core$routing$fn__30074.invoke(core.clj:185)",
      "clojure.core$some.invokeStatic(core.clj:2592)",
      "clojure.core$some.invoke(core.clj:2583)",
      "compojure.core$routing.invokeStatic(core.clj:185)",
      "compojure.core$routing.doInvoke(core.clj:182)",
      "clojure.lang.RestFn.applyTo(RestFn.java:139)",
      "clojure.core$apply.invokeStatic(core.clj:648)",
      "clojure.core$apply.invoke(core.clj:641)",
      "compojure.core$routes$fn__30078.invoke(core.clj:192)",
      "cayenne.api.route$wrap_async$fn__36434.invoke(route.clj:251)",
      "ring.middleware.keyword_params$wrap_keyword_params$fn__35954.invoke(keyword_params.clj:38)",
      "ring.middleware.nested_params$wrap_nested_params$fn__36002.invoke(nested_params.clj:91)",
      "ring.middleware.params$wrap_params$fn__35918.invoke(params.clj:69)",
      "cayenne.api.route$wrap_cors$fn__36398.invoke(route.clj:162)",
      "cayenne.api.route$wrap_heartbeat$fn__36440.invoke(route.clj:276)",
      "cayenne.api.conneg$wrap_accept$fn__29304.invoke(conneg.clj:53)",
      "cayenne.api.route$wrap_exception_handler$fn__36413.invoke(route.clj:212)",
      "cayenne.api.route$wrap_ignore_trailing_slash$fn__36416.invoke(route.clj:220)",
      "ring.middleware.gzip$wrap_gzip$fn__35482.invoke(gzip.clj:102)",
      "ring.logger$wrap_log_request_start$fn__35413.invoke(logger.clj:100)",
      "ring.logger$wrap_log_response$fn__35426.invoke(logger.clj:168)",
      "cayenne.api.route$wrap_raise$fn__36445.invoke(route.clj:281)",
      "ring.adapter.jetty$async_proxy_handler$fn__35662.invoke(jetty.clj:59)",
      "ring.adapter.jetty.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a.handle(Unknown Source)",
      "org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)",
      "org.eclipse.jetty.server.Server.handle(Server.java:516)",
      "org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)",
      "org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)",
      "org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)",
      "org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)",
      "org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)",
      "org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)",
      "org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)",
      "org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)",
      "org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)",
      "org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)",
      "org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)",
      "org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383)",
      "org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882)",
      "org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)",
      "java.base/java.lang.Thread.run(Thread.java:833)"
    ],
    "cause": null
  }
}

The directory filter is no longer supported in the REST API. Please see the official documentation at https://api.crossref.org/swagger-ui/index.html for supported filters.