Skip to content

Commit 748c027

Browse files
committed
fix(schema): enhance error messages with file path context
Improved ParseError variants to include specific file paths in IO and YAML parsing errors, making debugging easier when files are missing or contain invalid content. - Modified ParseError::Io to include path information - Modified ParseError::Yaml to include path information - Added read_file_with_path helper function for consistent error handling - Updated all file reading operations to use new error format Now errors clearly indicate which specific file caused the issue, e.g.: - "IO error at /path/to/course.yml: No such file or directory" - "YAML parse error at /path/to/stage.yml: invalid type: string, expected u32"
1 parent ae7eb36 commit 748c027

File tree

4 files changed

+103
-80
lines changed

4 files changed

+103
-80
lines changed

Cargo.lock

Lines changed: 56 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ resolver = "2"
88
[package]
99
name = "backend"
1010
description = "Backend API and services for StackClass"
11-
version = "1.0.0"
11+
version = "1.0.1"
1212
edition = "2024"
1313

1414
default-run = "stackclass-server"

openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"license": {
77
"name": ""
88
},
9-
"version": "1.0.0"
9+
"version": "1.0.1"
1010
},
1111
"paths": {
1212
"/v1/courses": {

0 commit comments

Comments
 (0)