DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

4f2563e819ba148420fa88b8ffb7af959e56f884 — Jonni Liljamo 1 year, 9 months ago c3408e8
feat(shared): serialize APIError
3 files changed, 8 insertions(+), 1 deletions(-)

M Cargo.lock
M shared/Cargo.toml
M shared/src/error/api.rs
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"]