Skip to content
Snippets Groups Projects
  • Lucas Roesler's avatar
    c07bebbb
    fix: return provider response during fnc listing errors · c07bebbb
    Lucas Roesler authored
    
    Return the original upstream response body when the the list request
    returns an error. In general, the provider is returning useful and
    actionable error messages for the user, the previous code hid this in
    the logs and this is easy for user to overlook.
    
    Additionally, remove an early return from error case after fetching
    metrics. This looked like a bug and could result in empty api responses
    if there was a prometheus error.
    
    Signed-off-by: default avatarLucas Roesler <roesler.lucas@gmail.com>
    c07bebbb
    History
    fix: return provider response during fnc listing errors
    Lucas Roesler authored
    
    Return the original upstream response body when the the list request
    returns an error. In general, the provider is returning useful and
    actionable error messages for the user, the previous code hid this in
    the logs and this is easy for user to overlook.
    
    Additionally, remove an early return from error case after fetching
    metrics. This looked like a bug and could result in empty api responses
    if there was a prometheus error.
    
    Signed-off-by: default avatarLucas Roesler <roesler.lucas@gmail.com>