constata-eu / constata-client Goto Github PK
View Code? Open in Web Editor NEWA binary and rust library to interact with the Constata.eu API.
License: GNU General Public License v3.0
A binary and rust library to interact with the Constata.eu API.
License: GNU General Public License v3.0
thread 'main' panicked at 'Sign and timestamp to succeed: Io(Os { code: 21, kind: Other, message: "Is a directory" })', src/bin.rs:99:8
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
Si bien glosa "Is a directory", debería limpiarse la salida para que solo "Is a directory" y agregar que debe utilizarse stamp sobre files.
{dir_name} Is a directory. Stamping could only be applied on files. If you want to stamp an entire directory, consider compress it into a zip file
thread 'main' panicked at 'Sign and timestamp to succeed: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })', src/bin.rs:99:8
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
File not found using path ...
Al darle un argumento inesperado a stamp la salida es bastante clara, algo similar debería suceder con los dos errores anteriores. El uso de diferentes colores, rojo para "error" y degrade para "--help", como ya está implementado, hacen mucho más legible la salida :)
thread 'main' panicked at 'called Result::unwrap()
on an Err
value: DailyKeyEncriptionError', src/bin.rs:94:55
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
Daily password is incorrect.
thread 'main' panicked at 'Sign and timestamp to succeed: Network(Status(422, Response[status: 422, status_text: Unprocessable Entity, url: https://api-staging.constata.eu/documents/]))', src/bin.rs:99:8
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
Desde el engine (public api) necesitamos mas información del error para identificarlo
Podría tener como salida "Este documento ha sido sellado anteriormente, su document_id es xxxxxxxxxxxxxxxxxxxxx"
This document was already stamped. document_id: xxxxxxx
thread 'main' panicked at 'Sign and timestamp to succeed: Network(Status(422, Response[status: 422, status_text: Unprocessable Entity, url: https://api-staging.constata.eu/documents/]))', src/bin.rs:99:8
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
Desde el engine (public api) necesitamos mas información del error para identificarlo
This document is empty. We can't stamp empty documents
thread 'main' panicked at 'called Result::unwrap()
on an Err
value: Network(Status(404, Response[status: 404, status_text: Not Found, url: https://api-staging.constata.eu/documents/12-79f9569b7616326f45059f28a3a3ba2a9f4834a9f36717f95a093b66352/html_proof]))', src/bin.rs:110:8
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
Revisar public_api para ver si se puede diferenciar un documento pending a uno inexistente. (si es pending mostrar ETA)
Podría modificarse por "El documento aún no ha sido publicado, su estado es "draft o pending". Intenta más tarde."
Document not published yet. Try later. Estimated published time: ...
en el caso de que no exista
Document Id is wrong
Al utilizar pipe para la salida de cualquier comando genera el siguiente output:
thread 'main' panicked at 'failed printing to stdout: Broken pipe (os error 32)', library/std/src/io/stdio.rs:935:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Cabe aclarar que los comandos se ejecutan sin problemas y el pipe redirige perfectamente la salida a comandos como grep o awk. Pero persiste dicha salida, lo que puede generar confusión en el usuario.
Aquí un caso similar:
rust-lang/rust#46016
Al ejecutar dos veces verify-website de un mismo sitio web, y luego website-verifications para verificarlo, se duplica la leyenda "Web: Verificamos que el firmante administra la web https://sitio.web" en el certificado de sello de tiempo.
Environment: production
SO: GNU/Linux y MS Windows.
Al descargar el documento sellado desde el certificado de sello de tiempo html, siempre utiliza el nombre document.(pdf..txt..jpg..etc). Resultaría más evidente, al momento de guardarlo/extraerlo, que mantenga el nombre original del documento.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.