• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

TAMULib / CatalogService / 27629250618
62%
main: 63%

Build:
Build:
LAST BUILD BRANCH: eureka_sprint_1-staging
DEFAULT BRANCH: main
Ran 16 Jun 2026 03:37PM UTC
Jobs 1
Files 38
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Jun 2026 03:23PM UTC coverage: 62.081% (-1.0%) from 63.032%
27629250618

Pull #224

github

kaladay
Issue 223: Improve error handling and processing of OKAPI response.

This should already work when replacing the **OKAPI** **URL** with the **KONG** **URL**.
However, the error handling/reporting (and lack thereof) has made the process confusing and more problematic.

These changes help improve the design to improve the ability to investigate and handle problems with migrating to other services like **KONG**.

Ensure the **OKAPI** (or now **KONG**) response is in a separate `try..catch..` statement.
This will help properly identify and report problems with communicating to **OKAPI**.

Bring in the controller advice and similar functionality from other repositories, like **IBIS**.
This provides an actual response to the user on error.
Previously an error would result in no response on curl commands.
This is confusing and not ideal.

This also brings in the response **JSON** structure from **IBIS**.
**IBIS** uses **Java** record types, but that is not available for this repository because **Java** records are not supported in **Java 11**.
Implement this as a class with getters and setters.

Break apart the **HTTP** client and server errors into explicit exceptions so that they may be more explicitly handled.

Add and improve relevant NULL pointer checks in the **FOLIO** catalog service class.
In particular, the `response.hasBody()` check could fail because `response` could be NULL.
Then the `response.getBody()` can return NULL, so just check that for NULL directly rather than calling a function `hasBody()` to effectuate the NULL check.
Repeat this logic for the `isArray()` call.

Remove unnecessary `.toString()` call.

Prevent NULL pointer problems in `getDate()` with `input` by adding an explicit check.

The unit test structure is changed to handle the new behavior where a separate request to **OKAPI** is being made.
Disabling the trimming of the stack traces in exceptions so that unit test failures can be better interpreted.
Pull Request #224: Issue 223: Improve error handling and processing of OKAPI response.

116 of 206 new or added lines in 7 files covered. (56.31%)

21 existing lines in 2 files now uncovered.

889 of 1432 relevant lines covered (62.08%)

0.62 hits per line

Uncovered Changes

Lines Coverage ∆ File
66
59.57
0.72% service/src/main/java/edu/tamu/catalog/service/FolioCatalogService.java
8
20.0
service/src/main/java/edu/tamu/catalog/exception/CatalogHttpClientException.java
8
20.0
service/src/main/java/edu/tamu/catalog/exception/CatalogHttpServerException.java
5
78.26
service/src/main/java/edu/tamu/catalog/advice/AbstractAdvice.java
3
72.73
service/src/main/java/edu/tamu/catalog/advice/IndexAdvice.java

Coverage Regressions

Lines Coverage ∆ File
20
5.0
-50.0% service/src/main/java/edu/tamu/catalog/exception/RestExceptionHandler.java
1
59.57
0.72% service/src/main/java/edu/tamu/catalog/service/FolioCatalogService.java
Jobs
ID Job ID Ran Files Coverage
1 27629250618.1 16 Jun 2026 03:37PM UTC 38
62.08
GitHub Action Run
Source Files on build 27629250618
  • Tree
  • List 38
  • Changed 3
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #224
  • PR Base - eureka_sprint_1-staging (#27300547819)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc