Question

App Platform Functions experience, painful

Having used other platform serverless functions, I thought it would be straightforward enough, instead I found a painful and frustrating experience.

First, I don’t have a gitlab/github account, I use BitBucket (for work), not the end of the world so I signed up on Github.

Error handling, thought I could just check the logs of the function, nope. They’re empty. Read something about you don’t get logs from functions in an App? But my function has to be in an app as I was planning on connecting to a managed DB instance using trusted sources. So I signed up to another service, LogTail, set it up and still no events in LogTail, is the log forwarding connection even working? Would have been nice if there was a ‘test’ button or some sort of feedback that it was working. What should even be logged?

The only hint you get that something is wrong when you run your function is,

{
  "code": “a6a0f5d21783f7b14cba49dbf29170ed",
  "error": "There was an error processing your request."
}

Excellent. Very helpful. No event in LogTail either, which might not be working. I might have set it up wrong, but who is to know?

So I debug by commenting out code, pushing to git, waiting, refreshing, in a rapid cycle to debug issues, going completely mad.

After 2 days I’ve just discovered that if I deploy the ca-certificate.crt file from the managed DB instance in my function package, you get the dreaded ‘There was an error processing your request.’ . I’m sure there is a good reason for this, it isn’t obvious, just more trial and error to find this out.

All in all, having used DO for quite a few years now (and other platforms), the functions experience feels very beta. If I was to continue, I am going to have to rely on never having any issues, because if I get the “There was an error processing your request.” I’m doomed with no chance of debugging.

I really hope I’m missing some step somewhere.

Show comments

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Yeah… I’m gonna concur here. Truly needlessly painful. Documentation is scattered and incomplete. I’m getting along but this this is supposed to be cheaper development and maintenance path. Maybe it will be after I’ve hunted and pecked my way through all the traps. Who knows but this needs much better documentation and way more samples.

This comment has been deleted

    Try DigitalOcean for free

    Click below to sign up and get $200 of credit to try our products over 60 days!

    Sign up

    Get our biweekly newsletter

    Sign up for Infrastructure as a Newsletter.

    Hollie's Hub for Good

    Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

    Become a contributor

    Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

    Welcome to the developer cloud

    DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

    Learn more
    DigitalOcean Cloud Control Panel