Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no transparent errors should bubble to top of app #183

Closed
robfitzgerald opened this issue Apr 9, 2024 · 0 comments · Fixed by #260
Closed

no transparent errors should bubble to top of app #183

robfitzgerald opened this issue Apr 9, 2024 · 0 comments · Fixed by #260
Labels
rust Applies to the rust code

Comments

@robfitzgerald
Copy link
Collaborator

robfitzgerald commented Apr 9, 2024

attempting to run a compass app and i was getting this error:

[2024-04-08T22:49:11Z ERROR mep_routee_compass] invalid type: map, expected variant identifier

this was due to the fact that my configuration TOML's output policy had double braces instead of single:

[[response_output_policy]] # should be [...]
type = "file"

the error is vague because CompassAppError has a transparent ConfigError (from the config crate):

    #[error(transparent)]
    ConfigError(#[from] ConfigError),

Compass' top-level error types should not be transparent unless they do not require context. this should instead return a BuildError or similar where the developer includes the contextual information:

    #[error("error building component {0} of type {1}: {2}")]
    BuildError(String, String, String),
@robfitzgerald robfitzgerald added the rust Applies to the rust code label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Applies to the rust code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant