This topic was automatically generated from Slack. You can find the original thread here.
Hey, I am currently trying to create a custom action in pipedrive but I am getting an error,
$ pd publish select_from_table.mjs
component create api call responded with status: 500, body: {"error":"Unexpected error, please reach out to our team at https://pipedream.com/support"}
It initially worked and i was able to publish but currently when trying to update the version and publishing getting the 500 error.
Things I tried:
• deleted
the published action and tried to publish failed
• updating the version, still got the 500,
• a fresh init action with the same code but initial version 0.0.1
still getting the 500
• logged out with the cli and logged in again and tried, still got the 500
Here is the simple function, any assistance will be highly appreciated
import { axios } from "@pipedrive/platform";
export default {
name: "Select From Table",
version: "0.0.2",
key: "select_from_table",
description: "",
props: {
tableName: {
type: "string",
label: "Table Name",
default: "integrations",
},
},
type: "action",
methods: {},
async run({ $, steps }) {
const supabaseUrl = process.env.SUPABASE_URL;
const supabaseKey = process.env.SUPABASE_ANON_KEY;
const config = {
headers: {
apiKey: supabaseKey,
Authorization: `Bearer ${supabaseKey}`,
},
};
const url = `${supabaseUrl}/rest/v1/${this.tableName}?select=*`;
return axios.get(url, config);
},
};
the environment variables are set within the dashboard itself