dynamo_llm/http/service/error.rs
1// SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2// SPDX-License-Identifier: Apache-2.0
3
4use thiserror::Error;
5
6/// Implementation of the Completion Engines served by the HTTP service should
7/// map their custom errors to to this error type if they wish to return error
8/// codes besides 500.
9#[derive(Debug, Error)]
10#[error("HTTP Error {code}: {message}")]
11pub struct HttpError {
12 pub code: u16,
13 pub message: String,
14}