-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
API deleting vlan associated with prefix causes HTTP error 500 #3211
Comments
This is due to the relation having
I’m not sure which way is preferrable. |
@hellerve |
It would. It turns out I miread OP’s desired behavior. The behavior that they want is actually probably |
Yes, we wouldn't want to use Cascade here. SET_NULL is what you want. |
@DanSheps do you want to work on it? Otherwise I’m fine with adding a patch! |
Sorry if I stole your thunder by opening #3215 there. |
The |
I can fix it in that way instead. Would you be interested in a PR from my side? Generally, we could introduce a middleware that catches all instances of |
@hellerve I was going to dig into it a bit later, but you're certainly welcome to take a stab at it. I'd like to avoid introducing new middleware, but I haven't evaluated any other options. |
To provide a bit of context: The ExceptionHandlingMiddleware was introduced to catch common installation/configuration issues and draw the user's attention to them, in an effort to shorten the troubleshooting process. It's not intended to address issues stemming from the data itself. Here's how we currently handle
I figure the simplest way to replicate this behavior for the API would be to extend |
@jeremystretch Sure, we can do that! I’m lacking a little context in some parts of the codebase, so bear with me when I reach for the wrong abstraction every once in a while! I’ll adjust #3222. |
@jeremystretch I moved the logic into |
Environment
Steps to Reproduce
Expected Behavior
Observed Behavior
fails with HTTP 500
The text was updated successfully, but these errors were encountered: