× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Jon,

The accessToken field is retrieved from a CHAR(2048) field in a database file.
I guess I could change the field to varchar(2048) in the file.

So I think the %trim is necessary, otherwise it's padded with blanks.

Greg

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jon Paris
Sent: Friday, May 10, 2024 11:51 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: UPS JSON API Response

Glad you found it.

You might want to think about changing your token variables (and possibly others) to varchar and avoid the %Trims. And unless your return value is defined as varchar - the %Trim is doing nothing anyway.


Jon P.

On May 10, 2024, at 10:58 AM, Greg Wilburn <gwilburn@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

Well... thanks to the logging, I found my BONEHEAD mistake.

My code was actually trying to use the expired token for 5 minutes AFTER it expired instead of getting a new token 5 minutes BEFORE it expired.

Code was:
// Check Access Token Expiration - refresh if it expires in next 5 minutes
if tokenExpire > %timestamp - %seconds(300);
return %trim(accessToken);
endif;

Code now:
if tokenExpire > %timestamp + %seconds(300);
return %trim(accessToken);
endif;

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
(WalzCraft) Jerry Forss
Sent: Wednesday, May 8, 2024 3:46 PM
To: Midrange Systems Technical Discussion
<midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: RE: [EXTERNAL] UPS JSON API Response

UPS is, let's say, challenging.
They have arbitrary throttle limits and max requests that hit at various times.

Depending on the time of day, shipping MAY try again a little later.

I have it where I rate shop between 3 parcel carriers.
With hitting tiers and rates, if someone doesn't like to play nice the package goes to the next carrier.
The carrier sales rep doesn't like it so they push the issue to get service working better. MINOR success.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.