Netflix / zuul

Zuul is a gateway service that provides dynamic routing, monitoring, resiliency, security, and more.
Apache License 2.0
13.55k stars 2.39k forks source link

Exception in ZuulFilter results in a 401 status code #359

Open JamesMcMahon opened 7 years ago

JamesMcMahon commented 7 years ago

Using zuul-core 1.3.0 (via spring-cloud-starter-zuul 1.3.4.RELEASE) in my project and I noticed that every time an exception happens in a Zuul Filter I see a 401 status code. Is this intentional behavior?

I've tried to par the issue down to the following, if you drop the following Kotlin filter into a new project and CURL at the associated path you should see a 401.

package com.test.zuul.filter

import com.netflix.zuul.ZuulFilter

class TestFilter : ZuulFilter() {

    override fun run(): Any? {
        throw RuntimeException("test")
    }

    override fun shouldFilter(): Boolean {
        return true
    }

    override fun filterType(): String {
        return "pre"
    }

    override fun filterOrder(): Int {
        return 2
    }
}
github-actions[bot] commented 3 days ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.