fix: update docs and errors with CKANError

This commit is contained in:
rzmk 2026-05-05 16:48:56 -04:00
parent 677475f750
commit e5d4f8d442
5 changed files with 18 additions and 11 deletions

View file

@ -11,10 +11,11 @@ This means that instead of using generic request library crates such as `reqwest
For example the following code can be ran to send an HTTP POST request to the `/package_list` endpoint of a local CKAN instance's API by using the `ckanaction` crate:
```rust
use ckanaction::CKANError;
use dotenvy::dotenv;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
async fn main() -> Result<(), CKANError> {
// Load environment variables from .env file
dotenv()?;

View file

@ -48,10 +48,11 @@ paths:
- lang: rust
label: Rust SDK (ckanaction) example
source: |
use ckanaction::CKANError;
use dotenvy::dotenv;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
async fn main() -> Result<(), CKANError> {
// Load environment variables from .env file
dotenv()?;
@ -420,10 +421,11 @@ paths:
- lang: rust
label: Rust SDK (ckanaction) example
source: |
use ckanaction::CKANError;
use dotenvy::dotenv;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
async fn main() -> Result<(), CKANError> {
// Load environment variables from .env file
dotenv()?;
@ -814,10 +816,11 @@ paths:
- lang: rust
label: Rust SDK (ckanaction) example
source: |
use ckanaction::CKANError;
use dotenvy::dotenv;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
async fn main() -> Result<(), CKANError> {
// Load environment variables from .env file
dotenv()?;
@ -1024,10 +1027,11 @@ paths:
- lang: rust
label: Rust SDK (ckanaction) example
source: |
use ckanaction::CKANError;
use dotenvy::dotenv;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
async fn main() -> Result<(), CKANError> {
// Load environment variables from .env file
dotenv()?;