Why am I receiving a "500 status error" when trying to publish an action in Pipedream?

This topic was automatically generated from Slack. You can find the original thread here.

Hi folks, I’m currently developing an action and when I try to publish it using:
pd publish <action-name>
and I’m getting the following error message:
component create api call responded with status: 500, body: {"error":"Unexpected error, please reach out to our team at https://pipedream.com/support"}
It started aprox. 30 min ago… Is there any guidance you guys can provide here?

We unfortunately don’t have great error handling in the CLI right now, but we were able to trace the error on our end:

{"name":"ReferenceError","message":"purchase_pending is not defined","stack":"ReferenceError: purchase_pending is not defined\n    at file:///tmp/__pdg__/dist/code/dadb463d7fac6065e2875002054a3c82f3f575f5ede7e7016870c643df706590/code/common/constants.mj...
irb(main):011:0> puts sc.zip_file("common/constants.mjs")
const phoneNumberStatus = {
    'PURCHASE PENDING': purchase_pending,
    'PURCHASE FAILED': purchase_failed,
    'PORT PENDING': port_pending,
    "ACTIVE": active,
    'DELETED': deleted,
    'PORT FAILED': port_failed,
    'EMERGENCY ONLY': emergency_only,
    'PORTED OUT': ported_out,
    'PORT OUT PENDING': port_out_pending,
};

const paymentMethods = {
    'PAY PER MINUTE': pay-per-minute,
    'CHANNEL': channel,
};

const sortPhoneNumbers = {
    'PURCHASED AT': purchased_at,
    'PHONE NUMBER': phone_number,
    'CONNECTION NAME': connection_name,
    'USAGE PAYMENT METHOD': usage_payment_method,
};
export default {
    phoneNumberStatus,
    paymentMethods,
    sortPhoneNumbers,
};

Got it. Thanks Danny. I appreciate the help on this.