Skip to content

Response missed after add express-gateway-plugin-errors policy #1

@Miruako

Description

@Miruako

I tried this policy by fellowing the steps on the homepage, but I found my response lost.
Here is my gateway.config.yml:

https:
  port: 9443
  tls:
    "default":
      key: "key.pem"
      cert: "cert.pem"
admin:
  port: 9876
  host: localhost
apiEndpoints:
  aggregateAPIs:
    paths: 
      - '/cogarch/api/WorkspaceFacadeAPIs/*'
serviceEndpoints:
  aggregateService:
    url: 'https://localhost:4014'
    proxyOptions:
      secure: false
policies:
  - proxy
  - errors
pipelines:
  aggregate:
    apiEndpoints:
      - aggregateAPIs
    policies:
      - errors:
          - action:
              template: '{ "status": "$statusCode", "message": "$message" }'
              defaults:
                status: 503
                message: Internal Server Error
              messages:
                Internal Server Error: Oops... Please try again
                Validation Error: Some fields have validation errors
      - proxy: # policy name
          - action:
                serviceEndpoint: aggregateService
                changeOrigin: true
                selfHandleResponse: true

I tested in postman, the service already returned 401 but postman is still waiting for response.
image
Does any configuration thing I missed?

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