mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-26 12:38:04 +03:00
fix(core): better error when deserializing plugin config (#9631)
* Better error for errors decoding plugin config * changes
This commit is contained in:
parent
8a71858eb2
commit
7f6d2698c9
5
.changes/better-error-for-invalid-plugin-config.md
Normal file
5
.changes/better-error-for-invalid-plugin-config.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'tauri': patch:enhance
|
||||||
|
---
|
||||||
|
|
||||||
|
Improve the error message that is shown when deserializing the Tauri plugin config.
|
@ -677,7 +677,12 @@ impl<R: Runtime, C: DeserializeOwned> Plugin<R> for TauriPlugin<R, C> {
|
|||||||
name: self.name,
|
name: self.name,
|
||||||
handle: app.clone(),
|
handle: app.clone(),
|
||||||
raw_config: Arc::new(config.clone()),
|
raw_config: Arc::new(config.clone()),
|
||||||
config: serde_json::from_value(config)?,
|
config: serde_json::from_value(config).map_err(|err| {
|
||||||
|
format!(
|
||||||
|
"Error deserializing 'plugins.{}' within your Tauri configuration: {err}",
|
||||||
|
self.name
|
||||||
|
)
|
||||||
|
})?,
|
||||||
},
|
},
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user