{"record":{"id":"8b5c4c524e08b6d5","repo":"bevyengine/bevy","slug":"encountered-http-status-0-when-loading-asset","errorCode":null,"errorMessage":"Encountered HTTP status {0:?} when loading asset","messagePattern":"Encountered HTTP status (.+?) when loading asset","errorType":"http","errorClass":"AssetReaderError","httpStatus":null,"severity":"error","filePath":"crates/bevy_asset/src/io/mod.rs","lineNumber":62,"sourceCode":"    path::{Path, PathBuf},\n};\nuse thiserror::Error;\n\n/// Errors that occur while loading assets.\n#[derive(Error, Debug, Clone)]\npub enum AssetReaderError {\n    /// Path not found.\n    #[error(\"Path not found: {}\", _0.display())]\n    NotFound(PathBuf),\n\n    /// Encountered an I/O error while loading an asset.\n    #[error(\"Encountered an I/O error while loading asset: {0}\")]\n    Io(Arc<std::io::Error>),\n\n    /// The HTTP request completed but returned an unhandled [HTTP response status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status).\n    /// - If the request returns a 404 error, expect [`AssetReaderError::NotFound`].\n    /// - If the request fails before getting a status code (e.g. request timeout, interrupted connection, etc), expect [`AssetReaderError::Io`].\n    #[error(\"Encountered HTTP status {0:?} when loading asset\")]\n    HttpError(u16),\n}\n\nimpl PartialEq for AssetReaderError {\n    /// Equality comparison for `AssetReaderError::Io` is not full (only through `ErrorKind` of inner error)\n    #[inline]\n    fn eq(&self, other: &Self) -> bool {\n        match (self, other) {\n            (Self::NotFound(path), Self::NotFound(other_path)) => path == other_path,\n            (Self::Io(error), Self::Io(other_error)) => error.kind() == other_error.kind(),\n            (Self::HttpError(code), Self::HttpError(other_code)) => code == other_code,\n            _ => false,\n        }\n    }\n}\n\nimpl Eq for AssetReaderError {}\n","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_asset/src/io/mod.rs#L44-L80","documentation":"AssetReaderError::HttpErrorStatus: an HTTP-based AssetReader completed its request but received an unhandled response status code (e.g. 404, 500) instead of the asset bytes. The error carries the status so the caller can distinguish missing assets from server failures.","triggerScenarios":"Thrown at crates/bevy_asset/src/io/mod.rs:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["For 404: verify the asset URL/path is correct on the server","For 5xx: retry the request later or against a healthy server instance","Extend/adjust the remote asset source configuration if status codes are unexpectedly unhandled"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}