Epicor function failing without obvious error

I have a function that runs the AP Invoice Post when given a Group ID. This has been working, however it started failing to actually post the batch. I’m using REST V2, and the API key is correct. When trying to execute the function from the Help page, I get the following:



Has anyone had an experience like this?

What changed that it’s now not working? V1 to V2 REST change? Version change?

Any information in the Event Viewer for your Epicor App Server?

No, nothing’s changed that I’m aware of. We did have to stop/start the app servers after doind a repair on our database, but nothing else… Could it be we need to recycle the app pool on the servers?

What did that entail? Any data loss?

You need to catch errors in your functions and send them somewhere.

1 Like

Not necessarily. If he was getting exceptions he would get the “Something went wrong” and at least be able to check the Event Viewer. He’s getting a 200 from his function.

1 Like

Did I stutter? :rofl:

I mean as best practice. Lot easier to debug when you have something to go on.

I wonder if he has any exception captures in there already and not doing anything with it ?

No, not capturing exceptions that I’m aware of… How should I go about doing that? I’m REALLY new to working with functions!

Not seeing anything in the Event Viewer Epicor App Server events that appear related…

Show us your function. We can probably suggest some places to extract some debug info.

I’ve exported the function library (only has 1 function in it). How can I attach that to the thread?

PostAPInvoice.efxb (44.5 KB)

Never mind… :upside_down_face:

start by creating output variables for these and outputting them



1 Like

Moone Boy Waiting GIF by HULU

@klincecum I know right? Imma drive down to Kenosha and wake him up like Judge Smails
giphy1

OK, OK… I’m awake… I’ll do that

Added the variables and linked them to the output parameters… Display them with Show Message now?

Run it in swagger and you should get output