Skip to main content

Improved error messages and an `open` command in the Meroxa CLI

· 3 min read

We’ve introduced improved error messages for out of sync fixture data and unreachable resources, and we've introduced a convenience function to the apps commands to open the dashboard from the CLI with the latest Meroxa CLI release v2.17.0.

First, meroxa apps run provides better guidance around using the fixtures directory to exercise your Javascript Turbine Application code.

Previously, if apps.json and the fixture directory were not in sync, you would have seen an error message like the following:

$ meroxa apps run

Error: node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^

[Error: ENOENT: no such file or directory, open '/home/me/go/src/github.com/my-org/my-app/undefined'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/home/me/go/src/github.com/my-org/my-app/undefined'
}

With this latest release, you will find guidance like one of the following, depending on the situation:

Error: Error running Turbine Data app locally : You are trying to run your Turbine Data app with the resource "nyx-source" which currently does not have a local fixture association in your app config.
Please associate a suitable fixture file for "nyx-source" in /home/me/go/src/github.com/my-org/my-app/app.json before running the meroxa apps run command again.

or

Error: Error running Turbine Data app locally : You are trying to read from a resource "nyx-source" with the collection "orders" but the local fixture that you have associated with this resource in app.json does not contain a table named "orders".
Please associate another fixture file for "nyx-source" in your app.json or update the table name in your currently used fixture from "collection_name" to "orders".

Second, meroxa apps deploy provides better guidance around an unreachable Resource that is preventing a Turbine Application from being deployed.

Previously, the command would have returned an error that did not immediately indicate what actions would fix the failure and thus result in a successful deployment.

$ meroxa apps deploy
Validating your app.json...
✔ Checked your language is "golang"
✔ Checked your application name is "nyx-app"
Checking for uncommitted changes...
✔ No uncommitted changes!
Preparing to deploy application "nyx-app"...
✔ Successfully built the Golang binary
✔ Can access your Turbine resources
✔ No need to create process image
Deploying application "nyx-app"...
Error: 2023/03/17 16:26:34 retrieved resource nyx-source (postgres)
2023/03/17 16:26:35 failed to create or update connector

With the improvements, the command will now indicate which resource has a problem and that there is a connection problem.

$ meroxa apps deploy
Validating your app.json...
✔ Checked your language is "golang"
✔ Checked your application name is "nyx-app"
Checking for uncommitted changes...
✔ No uncommitted changes!
Preparing to deploy application "nyx-app"...
✔ Successfully built the Golang binary
✔ Can access your Turbine resources
✔ No need to create process image
Deploying application "nyx-app"...
Error: 2023/03/15 16:03:08 retrieved resource nyx-source (postgres)
2023/03/15 16:03:08 failed to validate resource. 1 problem occurred:
1. url: "unable to connect to resource: ensure the database is reachable at the specified URL and with the provided credentials"

Lastly, the Meroxa CLI has a new command - meroxa apps open. This command will help you quickly open a browser and navigate to the details page of your Turbine Application in the Meroxa Dashboard.

Meroxa Dashboard: App Detail View

If you have feedback for us or additional questions on how to get started, feel free to join our Discord community or email us at [email protected]!