Skip to content

Simple human readable error messages #781

@nick-roux

Description

@nick-roux

Describe the bug
Error messages are not human readable

To Reproduce
Steps to reproduce the behavior:

  1. Set options to scan from ADF
  2. Remove documents from ADF
  3. Click Scan

What actually happens
An overly complex message that is hard to interpret for the average user

{"message":"/usr/bin/scanimage -d escl:https://192.168.88.175:443 --source ADF --mode Gray --resolution 150 -l 0 -t 0 -x 210 -y 297 --format tiff --batch='data/temp/~tmp-scan-1-%04d.tif' exited with code: 7, stderr: scanimage: rounded value of resolution from 150 to 150\nscanimage: rounded value of tl-x from 0 to 0\nscanimage: rounded value of tl-y from 0 to 0\nscanimage: rounded value of br-x from 210 to 210\nscanimage: rounded value of br-y from 297 to 297\nScanning infinity pages, incrementing by 1, numbering from 1\nScanning page 1\nscanimage: sane_start: Document feeder out of documents\nBatch terminated, 0 pages scanned\n","code":-1}

Expected behavior
A clear and concise error informing one that there is no paper in the document feeder, without all the other clutter in the message

Screenshots

Image

Client (please complete the following information):

  • Browser: ALL

Server (please complete the following information):

  • OS: podman on Debian 12.13
  • image: sbs20/scanservjs:latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions