M Cargo.lock => Cargo.lock +1 -0
@@ 5361,6 5361,7 @@ name = "shared"
version = "0.1.0"
dependencies = [
"naia-bevy-shared",
+ "serde",
"thiserror",
]
M shared/Cargo.toml => shared/Cargo.toml +5 -0
@@ 13,3 13,8 @@ publish = false
naia-bevy-shared = "0.16.0"
thiserror = "1.0.38"
+
+[dependencies.serde]
+version = "1.0.152"
+default-features = false
+features = [ "derive" ]
M shared/src/error/api.rs => shared/src/error/api.rs +2 -1
@@ 6,10 6,11 @@
* See LICENSE for licensing information.
*/
+use serde::Serialize;
use thiserror::Error;
#[doc = "API errors are in the 1XXXX range"]
-#[derive(Debug, Error)]
+#[derive(Debug, Serialize, Error)]
pub enum APIError {
// general errors
#[doc = "Should never be used, but still exists just in case"]