pelican-dev / panel

https://pelican.dev
GNU Affero General Public License v3.0
608 stars 72 forks source link

Add exception handling to CreateNode/ EditNode & CreateServer/ EditServer #411

Open Boy132 opened 2 weeks ago

Boy132 commented 2 weeks ago

We probably want to add some more fine tuned exception handling at some point but for now this stops all 500 errors or silent errors and replaces them with a notification.

notAreYouScared commented 2 weeks ago

I attempted to test this with editing a server but it caused the panel to lock up... image

Edit Server -> Remove Owner, click save.

This seems to break the stock error handling as the owner is a required field.

Boy132 commented 2 weeks ago

I attempted to test this with editing a server but it caused the panel to lock up... image

Edit Server -> Remove Owner, click save.

This seems to break the stock error handling as the owner is a required field.

Yeah, seems like Filament doesn't like the livewire exception hook. I used good old try-catchs now.

notAreYouScared commented 2 weeks ago

Anyway we can catch the 500 on the create allocation, on the create server page?

image image image

Unless we just need to rewrite the logic, the port already exists... we should just skip over it, and present an error saying something along the lines of

Failed to Create Allocation Failed to Create: :,

Boy132 commented 2 weeks ago

Anyway we can catch the 500 on the create allocation, on the create server page?

image image image

Unless we just need to rewrite the logic, the port already exists... we should just skip over it, and present an error saying something along the lines of

Failed to Create Allocation Failed to Create: :,

Wouldn't #395 fix/ change that anyways?

notAreYouScared commented 2 weeks ago

It would, but who knows when that would be done.

notAreYouScared commented 2 weeks ago

With latest changes 500's are still thrown when it skips the ports and does not return anything

image

notAreYouScared commented 1 week ago

^^ Memory Leak when creating ports that already exist. image