Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Additional serror fields are not presented in error message #1654

Closed
IzabellaRaulin opened this issue Jun 7, 2017 · 0 comments
Closed

Additional serror fields are not presented in error message #1654

IzabellaRaulin opened this issue Jun 7, 2017 · 0 comments

Comments

@IzabellaRaulin
Copy link
Contributor

See package serror

There is a possibility to set serror fields to provide more details about occurring error, however, it is not presented in error message.

This happens when creating task failed and just serror.Error() is taken into account in error message - see core/task.go#L310

For example, for such returned serror:

return serror.New(
 ErrPluginIncompatibleWithScheduleType,
 map[string]interface{}{
 "schedule_type": fmt.Sprintf("%T", sch),
 "plugin_name":   plg.Name(),
 "plugin_type":   plg.TypeName(),
 },
)

I expected to have "schedule_type", "plugin_name" and "plugin_type" details in snap error message, but they are skipped.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants