REST Call Error Code 1010 (Solved)

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
johntalbott
Posts: 619
Joined: Wed Jun 17, 2015 11:16 pm
Location: Omaha, Nebraska
Contact:

REST Call Error Code 1010 (Solved)

Post by johntalbott »

Is anyone familiar with this error?

There is nothing in the service documentation that references error 1010. https://positionstack.com/documentation

I get a similar popup message in the browser, but the following is from the AIM server output:
2020-01-26 00:58:12,521 ERROR RTCRM#admin -Execution Exception after starting process GetGeocodeByAddress message Service provider returned the following error: error code: 1010

I'm getting this with the following hard coded url which works fine in Postman or Chrome browser.
geocodeurl.png
geocodeurl.png (33.24 KiB) Viewed 21979 times

Postman response body

Code: Select all

{
    "data": [
        {
            "latitude": 38.897675,
            "longitude": -77.036547,
            "type": "address",
            "name": "1600 Pennsylvania Avenue NW",
            "number": "1600",
            "postal_code": "20500",
            "street": "Pennsylvania Avenue NW",
            "confidence": 1,
            "region": "District of Columbia",
            "region_code": "DC",
            "county": null,
            "locality": "Washington",
            "administrative_area": null,
            "neighbourhood": "White House Grounds",
            "country": "United States",
            "country_code": "USA",
            "continent": "North America",
            "label": "1600 Pennsylvania Avenue NW, Washington, DC, USA"
        },
        {
            "latitude": 38.897498,
            "longitude": -77.037538,
            "type": "address",
            "name": "1600 Pennsylvania Avenue Northwest",
            "number": "1600",
            "postal_code": "20500",
            "street": "Pennsylvania Avenue Northwest",
            "confidence": 1,
            "region": "District of Columbia",
            "region_code": "DC",
            "county": null,
            "locality": "Washington",
            "administrative_area": null,
            "neighbourhood": "White House Grounds",
            "country": "United States",
            "country_code": "USA",
            "continent": "North America",
            "label": "1600 Pennsylvania Avenue Northwest, Washington, DC, USA"
        }
    ]
}
Last edited by johntalbott on Sat Feb 01, 2020 3:44 pm, edited 1 time in total.
VocalDay Solutions - Agility - Predictability - Quality

We specialize in enabling business through the innovative use of technology.

AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
himanshu
Posts: 722
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Re: REST Call Error Code 1010

Post by himanshu »

Hi John,

I also have the same issue in one implementation. I currently manage to create a plugin and complete the task to meet timelines.
I am sure this is not from the API provider, it must be something which is not posted properly from AIM. I will spend some more time to troubleshoot the issue later week and will update with my findings.

On which AIM version you did this test?
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
johntalbott
Posts: 619
Joined: Wed Jun 17, 2015 11:16 pm
Location: Omaha, Nebraska
Contact:

Re: REST Call Error Code 1010

Post by johntalbott »

Hello Himanshu. Thanks for the information.

I've tested in 8.3 and the latest build (2719) of 8.4.
VocalDay Solutions - Agility - Predictability - Quality

We specialize in enabling business through the innovative use of technology.

AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: REST Call Error Code 1010

Post by aware_support »

This IS from the provider, so you need to ask him what the cause of this error is.
Aware IM Support Team
gijsvb
Posts: 45
Joined: Fri Jan 23, 2015 5:32 pm

Re: REST Call Error Code 1010

Post by gijsvb »

Same error here on a simple call to openiban service.

Error 1010 nowhere to be found in the service provider docs.
Gijs van Ballegooijen.
the Netherlands.

AwareIM 8.4 (build 2708)
Server: Ubuntu Linux 18.04.2
Database: MariaDB
Config: Windows 2012R2
BobK
Posts: 544
Joined: Thu Jan 31, 2008 2:14 pm
Location: Cincinnati, Ohio, USA

Re: REST Call Error Code 1010

Post by BobK »

gijsvb wrote:Same error here on a simple call to openiban service.

Error 1010 nowhere to be found in the service provider docs.
The following is my answer I added in the other thread.
@gijsvb

To get https://openiban.com/validate/NL36RABO0310308267 working within Aware:
In your BO that implements REST, add the following to the "Request HTTP Headers"

Accept */*
User-Agent Mozilla/5.0
Cache-Control no-cache
Host openiban.com
Connection keep-alive

I added all 5 and it worked, but I do not know which one actually fixed the issue.
I got these headers from looking at what headers Postman used when successfully making the REST call. I removed the Postman-Token and Accept-Encoding headers and changed the User-Agent to Mozilla/5.0.
Bob
johntalbott
Posts: 619
Joined: Wed Jun 17, 2015 11:16 pm
Location: Omaha, Nebraska
Contact:

Re: REST Call Error Code 1010

Post by johntalbott »

Thanks for the guidance.

I narrowed it down to the User-Agent header. It appears that hosts throwing the error must require it.

https://developer.mozilla.org/en-US/doc ... User-Agent

https://stackoverflow.com/questions/242 ... uest-valid
VocalDay Solutions - Agility - Predictability - Quality

We specialize in enabling business through the innovative use of technology.

AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
gijsvb
Posts: 45
Joined: Fri Jan 23, 2015 5:32 pm

Re: REST Call Error Code 1010-SOLVED

Post by gijsvb »

johntalbott wrote:Thanks for the guidance.

I narrowed it down to the User-Agent header. It appears that hosts throwing the error must require it.

https://developer.mozilla.org/en-US/doc ... User-Agent

https://stackoverflow.com/questions/242 ... uest-valid

Thanks, adding the HTPP request header values is the solution. Just added the 'accept', 'user-agent' and 'cache' parameters and it worked.

Thanks a lot.
Gijs van Ballegooijen.
the Netherlands.

AwareIM 8.4 (build 2708)
Server: Ubuntu Linux 18.04.2
Database: MariaDB
Config: Windows 2012R2
Post Reply