Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
scc-net
netvs
netvs-core
Commits
72162a3f
Commit
72162a3f
authored
Oct 14, 2021
by
janis.streib
🦉
Browse files
UPD: middleware: more graceful 404 handling
parent
71e389ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
middleware/net_suite/modules/macfinder/views.py
View file @
72162a3f
...
...
@@ -75,7 +75,7 @@ def oui_lookup():
mac
=
format_mac
(
request
.
args
[
'mac'
])
vendor
=
OUI_DB
.
get
(
mac
[:
8
],
None
)
if
vendor
is
None
:
return
abort
(
404
)
return
jsonify
({
'mac'
:
mac
,
'vendor'
:
None
}),
404
return
jsonify
({
'mac'
:
mac
,
'vendor'
:
vendor
})
...
...
middleware/net_suite/views.py
View file @
72162a3f
...
...
@@ -134,7 +134,7 @@ def handle_db_error(e):
@
app
.
errorhandler
(
404
)
def
handle_not_found
(
e
):
return
jsonify
({
'type'
:
'not found'
,
'error'
:
str
(
e
)}),
404
return
e
@
app
.
errorhandler
(
Exception
)
def
handle_generic
(
e
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment