Ticket #420 (new enhancement)

Opened 1 year ago

Last modified 1 year ago

logging: bad article ID should give 404, not site error

Reported by: russ Assigned to: jsuttor
Priority: medium Milestone:
Component: ambra Version: 0.7
Keywords: Cc:
Blocking: Blocked By:

Description

on fetchArticle.action, if you enter something into the articleURI, you get a site error and a big pile of thread dump in the log.

this really should be a 404 and not a site error (if, for example, we have a bad link somewhere we'll notice if it shows up as a 404 in our web log analysis, but not if it shows up as a bunch of thread dumps in plosone.log), and should not generate a thread dump in the log.

2007-06-21 11:06:36,153 DEBUG ArticleOtmService> failed to ArticleOtmService.getObjectURL(info:doi/10.1371/journal.pone.0000488, XML) [TP-Processor8 org.plo\
s.article.service.ArticleOtmService]
2007-06-21 11:06:36,159 ERROR FetchArticleService> Transformation of article failed [TP-Processor8 org.plos.article.service.FetchArticleService]
org.plos.article.util.NoSuchArticleIdException: (id = 'info:doi/10.1371/journal.pone.0000488')(representation=XML)
        at org.plos.article.service.FetchArticleService.getAnnotatedContentAsDocument(FetchArticleService.java:385)
        at org.plos.article.service.FetchArticleService.getAnnotatedContentAsDOMSource(FetchArticleService.java:325)
        at org.plos.article.service.FetchArticleService.getTransformedArticle(FetchArticleService.java:98)
        at org.plos.article.service.FetchArticleService.getURIAsHTML(FetchArticleService.java:139)
        at org.plos.article.service.FetchArticleService$$FastClassByCGLIB$$4912ea24.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
        at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:674)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:126)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:114)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:615)
        at org.plos.article.service.FetchArticleService$$EnhancerByCGLIB$$65bbed8f.getURIAsHTML(<generated>)
        at org.plos.article.action.FetchArticleAction.execute(FetchArticleAction.java:37)

Dependency Graph

Change History

06/22/07 11:55:13 changed by amit

  • owner changed from jsuttor to jonnie.
  • milestone changed from TBD to 0.8.

Annoying and with REST problematic. Will take a look...

06/25/07 15:17:15 changed by jsuttor

  • owner changed from jonnie to jsuttor.

08/06/07 17:00:14 changed by jsuttor

  • milestone changed from 0.8 to 0.9.

this requires more thought, is the error from internal logic? if so, it's an ERROR, if it's from user input, it's more of a 404.

08/07/07 12:11:17 changed by russ

it seems to me that it's from user input.

for example, we haven't published article 9999 yet, but one day we will. for some reason a user enters that non-existant DOI (or another site links to it by mistake)

http://www.plosone.org/article/fetchArticle.action?articleURI=info:doi/10.1371/journal.pone.0009999

this should be a 404 - the resource we're asking topaz to fetch does not exist. there's no error, just a bad request.

even better would be a custom 404 explaining that the doi they entered is malformed or does not exist. but it's still a 404.

IMO NoSuchArticleIdException? shouldn't even be logged as ERROR - it should be INFO or WARN.

i have seen cases where plosone returns NoSuchArticleIdException? as a result of an error (mulgara is being lame or something) as opposed to user input, but in that case there should be some other error that leads to it...

09/02/07 22:41:40 changed by

  • milestone deleted.

Milestone 0.9 deleted