MCH3601 unmonitored by HTTPAPIR4

Discussions relating to writing software in ILE RPG (RPG IV). This includes both fixed and free format RPG.
Post Reply
mgallipeau
Posts: 9
Joined: Fri Mar 25, 2022 8:54 pm

MCH3601 unmonitored by HTTPAPIR4

Post by mgallipeau »

Would anyone be able to help me understand why I'm getting this error? I didn't really change the program. Just changed the url, bearer token, and tweaked the JSON, but it's valid. The program is blowing up on the following statement:
rc = http_req( 'POST' : url : *omit : *omit : *omit : JSONsnd : 'application/json');

JSONsnd holds the following value:
[ { "key": "000194", "name": "9571-0011", "quantity": 100, "active": true,"extensionData": { "greatlakes.status": "In Transit", "greatlakes.batch": "B0000138", "greatlakes.customer": "SYSTEMS LLC"}, "tagKey": "A00000000000000000000194" } ]

Here are the log errors I'm getting:
senddoc(): entered
[ { "key": "000199", "name": "9571-0011", "quantity": 50, "active": true,"extensionData": { "greatlakes.status": "In Transit", "greatlakes.batch": "B0000143", "greatlakes.customer": "SYSTEMS LLC"}, "tagKey": "A00000000000000000000199" } ]
recvresp(): entered
HTTP/1.1 404 Not Found
Content-Length: 171
Content-Type: application/problem+json; charset=utf-8
Date: Fri, 19 Apr 2024 20:28:24 GMT
Server: Kestrel


SetError() #13: HTTP/1.1 404 Not Found
recvresp(): end with 404
recvdoc parms: identity 171
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
recvdoc(): Receiving 171 bytes.
{"$id":"1","type":"https://tools.ietf.org/html/rfc7231#sec ... itle":"Not Found","status":404,"traceId":"00-e151df5ce8be80ed03278c18a393f008-c844fdb886f585ad-00"}


Thank you.
vhamberg
Posts: 13
Joined: Thu Jul 29, 2021 1:33 am

Re: MCH3601 unmonitored by HTTPAPIR4

Post by vhamberg »

What is the message text? And if you have the job log, it would help to see the messages that come before the MCH3601.
jonboy49
Posts: 206
Joined: Wed Jul 28, 2021 8:18 pm

Re: MCH3601 unmonitored by HTTPAPIR4

Post by jonboy49 »

It is pretty clear from the returned error text that you have made an error in the URL. Depending on the service, "error" could include credentials but more likely the URL itself.

You have changed pretty much everything about the relevant part of the program if what you said is true "... Just changed the url, bearer token, and tweaked the JSON ..."

Show us some code and we may be able to help more.

P.S. This topic should probably be in the HTTPAPI list.
Scott Klement
Site Admin
Posts: 661
Joined: Sun Jul 04, 2021 5:12 am

Re: MCH3601 unmonitored by HTTPAPIR4

Post by Scott Klement »

What version of HTTPAPI?
mgallipeau
Posts: 9
Joined: Fri Mar 25, 2022 8:54 pm

Re: MCH3601 unmonitored by HTTPAPIR4

Post by mgallipeau »

Scott, the version in the log says Ver 1.45 released 2021-09-20.

vhamberg, there really wasn't any other messages that came out on the job log before that MCH3601.

jonboy49, the developer I'm working with on the other side said he tried copying my body and endpoint into Postman and ran it in his Dev1 instance, and it worked. But he said he used a different bearer token, but if the bearer token wasn't valid, it should be unauthorized, not "not found". As far as the relevant part of the program, I understand what you're saying. I guess the JSON is valid, though. The url and bearer token have changed, but it's not "logic" that changed there; it's just the values, which I've already verified are what they are supposed to be.

The other developer said their API can work with TLS 1.3 and it looks like I'm using TLS version 1.2. Could that be the issue?
mgallipeau
Posts: 9
Joined: Fri Mar 25, 2022 8:54 pm

Re: MCH3601 unmonitored by HTTPAPIR4

Post by mgallipeau »

Hey, everyone. We got it figured out and it looks like it wasn't on my end at all. Thank you for your responses.
Scott Klement
Site Admin
Posts: 661
Joined: Sun Jul 04, 2021 5:12 am

Re: MCH3601 unmonitored by HTTPAPIR4

Post by Scott Klement »

I'm sure the problem you solved was to fix the 404 error. But it doesn't explain why you'd get an MCH3601... There were fixes in the past to fix MCH3601 in HTTPAPI.
mgallipeau
Posts: 9
Joined: Fri Mar 25, 2022 8:54 pm

Re: MCH3601 unmonitored by HTTPAPIR4

Post by mgallipeau »

Yeah, I have no idea But I didn't get the MCH3601 again.
Post Reply