[MGNLRESTCL-172] The countries rest client in declarative-rest-demo no longer works Created: 11/Nov/21  Updated: 08/Feb/22  Resolved: 08/Feb/22

Status: Closed
Project: REST Client
Component/s: None
Affects Version/s: 2.0.1
Fix Version/s: 2.0.2

Type: Bug Priority: Major
Reporter: Martin Drápela Assignee: Canh Nguyen
Resolution: Fixed Votes: 0
Labels: VN-Maintenance
Remaining Estimate: Not Specified
Time Spent: 6.25d
Original Estimate: Not Specified

Attachments: PNG File image-2022-01-10-09-41-02-814.png    
Issue Links:
Cloners
is cloned by MGNLRESTUI-58 The countries rest client in declarat... Closed
Problem/Incident
is caused by MGNLRESTCL-133 DOC: Debug subapp in the REST Client app Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: DevX 1, DevX 2, DevX 3
Story Points: 8

 Description   

https://git.magnolia-cms.com/projects/MODULES/repos/rest-client/browse/declarative-rest-demo/restClients/countries.yaml

The API has changed (new domain owner?) and is probably behind an API key wall:

(https://countrylayer.com/documentation/)
https://api.countrylayer.com/v2/
Opening "countries" in the mgnl Rest Client app produces a "Bad request."

 

 
2021-11-11 08:18:57,224 TRACE class org.ehcache.core.Ehcache-REST_CLIENT_CACHE  : Initializing
2021-11-11 08:18:57,227 DEBUG class org.ehcache.core.Ehcache-REST_CLIENT_CACHE  : Initialize successful.
2021-11-11 08:23:19,560 ERROR info.magnolia.rest.client.timeout.TimeoutHandler  : Timeout error while issuing a rest call, cause by: RESTEASY004655: Unable to invoke request: org.apache.http.conn.HttpHostConnectException: Connect to restcountries.eu:443 [restcountries.eu/15.197.142.173, restcountries.eu/3.33.152.147] failed: Connection timed out (Connection timed out)
2021-11-11 08:23:19,561 WARN  t.client.exception.handler.DefaultExceptionHandler: Error while issuing a rest call, target: https://restcountries.eu/rest/v2/all, cause by: RESTEASY004655: Unable to invoke request: org.apache.http.conn.HttpHostConnectException: Connect to restcountries.eu:443 [restcountries.eu/15.197.142.173, restcountries.eu/3.33.152.147] failed: Connection timed out (Connection timed out), cause by: Connect to restcountries.eu:443 [restcountries.eu/15.197.142.173, restcountries.eu/3.33.152.147] failed: Connection timed out (Connection timed out)

 

Might also need an update:

https://git.magnolia-cms.com/projects/MODULES/repos/rest-client/browse/declarative-rest-demo/templates/components/countries/countries.ftl

 Add integration tests to the CE project to verify demo is working.

 

 Demo also references old mtk instead of mtk2.

 



 Comments   
Comment by Jaroslav Simak [ 05/Jan/22 ]
  • Get access key if it doesn't expire
  • Find an alternative
  • Remove it from the demo
Comment by Canh Nguyen [ 10/Jan/22 ]

The domain name could be changed from restcountries.eu to restcountries.com.

This link https://restcountries.com/v2/all is working.

Generated at Mon Feb 12 10:43:53 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.