How to debug the DSpace 5 REST API?

105 views
Skip to first unread message

Chris Gray

unread,
Apr 26, 2018, 2:49:21 PM4/26/18
to DSpace Technical Support
We are trying to integrate Elsevier's PURE with the DSpace 5 REST API and having no luck so far.

One impediment is that the error codes for the REST API are nearly useless.  HTTP codes are being used and are used in inappropriate ways.  For instance, all unsuccessful login attempts return a 403 Forbidden, which is not what 403 means.  The correct code is 401 Unauthorized.

We are currently getting a 500 Internal Server Error, and I see from the Java code that there are a number different conditions that can throw this error.

Is there some way I can see exactly what's going wrong so I don't have to keep guessing what to try next?

Bram Luyten

unread,
Apr 30, 2018, 2:18:02 AM4/30/18
to Chris Gray, DSpace Technical Support
Hi Chris,

we are also actively working with clients on PURE integrations, exploring the REST-API, whereas PURE used to rely on the LNI connector in the past.
Normally, the dspace logs should provide some context about what's going on where. If you're not seeing any entries in your dspace logs for the REST calls, there might be something wrong regarding log config.

Very recently, we saw that PURE is making ?expand=bitstreams calls on items that are none existant/deleted, in which case DSpace returns 500 errors, but we still need to learn why PURE is exactly making these calls.

with kindest regards,

Bram

logoBram Luyten
250-B Lucius Gordon Drive, Suite 3A, West Henrietta, NY 14586
Gaston Geenslaan 14, 3001 Leuven, Belgium ***New address Apr 2017***
atmire.com

--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech+unsubscribe@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Chris Gray

unread,
May 14, 2018, 2:39:53 PM5/14/18
to DSpace Technical Support
Thanks for your reply, Bram,

As it turned out we were confused by a slight difference between our staging server (where we are test PURE integration) and out production server.  We had uri.identifier.doi on production and not on staging.  Once we added that to our metadata registry, everything started working.


On Monday, April 30, 2018 at 2:18:02 AM UTC-4, Bram Luyten wrote:
Hi Chris,

we are also actively working with clients on PURE integrations, exploring the REST-API, whereas PURE used to rely on the LNI connector in the past.
Normally, the dspace logs should provide some context about what's going on where. If you're not seeing any entries in your dspace logs for the REST calls, there might be something wrong regarding log config.

Very recently, we saw that PURE is making ?expand=bitstreams calls on items that are none existant/deleted, in which case DSpace returns 500 errors, but we still need to learn why PURE is exactly making these calls.

with kindest regards,

Bram

logoBram Luyten
250-B Lucius Gordon Drive, Suite 3A, West Henrietta, NY 14586
Gaston Geenslaan 14, 3001 Leuven, Belgium ***New address Apr 2017***
atmire.com

On 26 April 2018 at 20:49, Chris Gray <cpgr...@gmail.com> wrote:
We are trying to integrate Elsevier's PURE with the DSpace 5 REST API and having no luck so far.

One impediment is that the error codes for the REST API are nearly useless.  HTTP codes are being used and are used in inappropriate ways.  For instance, all unsuccessful login attempts return a 403 Forbidden, which is not what 403 means.  The correct code is 401 Unauthorized.

We are currently getting a 500 Internal Server Error, and I see from the Java code that there are a number different conditions that can throw this error.

Is there some way I can see exactly what's going wrong so I don't have to keep guessing what to try next?

--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages