Skip to content

[BUG] Improve cherrypy 400 errors to describe the underlying problem #63835

Closed
@whytewolf

Description

Description
A clear and concise description of what the bug is.

currently when encountering a 400 error in cherrypy you are just granted the 400 screen and no addition information. even worse nothing important is logged to the logs.

Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)

external_auth:
    sharedsecret:
        salt: ['.*', '@wheel', '@jobs', '@runner']
sharedsecret: testcase
rest_cherrypy:
  disable_ssl: True
  port: 8000

Please be as specific as possible and give set-up details.

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)
  • VM running on a cloud service, please be explicit and add details
  • container (Kubernetes, Docker, containerd, etc. please specify)
  • or a combination, please be explicit
  • jails if it is FreeBSD
  • classic packaging
  • onedir packaging
  • used bootstrap to install

Steps to Reproduce the behavior
setup 3006.x without setting up netapi_enable_clients then run any commands that try to use a client

Expected behavior
the error message is logged and the screen informs that netwpi_enable_clients needs to be setup.

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3006.0rc1

Dependency Versions:
          cffi: 1.14.6
      cherrypy: unknown
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.2
       libgit2: 1.5.0
  looseversion: 1.0.2
      M2Crypto: 0.38.0
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 22.0
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.9.8
        pygit2: 1.11.1
        Python: 3.10.10 (main, Feb 23 2023, 05:21:34) [GCC 11.2.0]
  python-gnupg: 0.4.8
        PyYAML: 5.4.1
         PyZMQ: 23.2.0
         smmap: Not Installed
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.4

System Versions:
          dist: ubuntu 22.04 jammy
        locale: utf-8
       machine: x86_64
       release: 5.15.0-60-generic
        system: Linux
       version: Ubuntu 22.04 jammy

Additional context
Add any other context about the problem here.

Metadata

Assignees

Labels

Bugbroken, incorrect, or confusing behaviorSalt-API

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions