-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ui): Show error message when max pods to view logs are reached #21725
base: master
Are you sure you want to change the base?
Conversation
✅ Preview Environment deployed on Bunnyshell
See: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
17ee38e
to
1f0dd19
Compare
Signed-off-by: Peter Jiang <[email protected]>
1f0dd19
to
d7272b6
Compare
// If there is an error, show it beforehand | ||
fetch(fullUrl).then(response => { | ||
if (!response.ok) { | ||
return response.text().then(text => { | ||
observer.error({status: response.status, statusText: response.statusText, body: text}); | ||
}); | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the preflight request necessary? Wouldn't the onerror
handler take care of this anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@crenshaw-dev The preflight request is needed because the onerror handler does not handle the HTTP request error (400 Bad Request) and swallows the error message.
Instead EventSource considers it a connection problem and throws the generic error('connection got closed unexpectedly')
Fixes #21706
Displays an error message in the logs when error message on "max pods to view logs are reached" when there are more than 10 pods for a deployment/replica set for better user experience.
Before:
After:
Checklist: