diff --git a/main.py b/main.py index 5732ee3..083c8c8 100644 --- a/main.py +++ b/main.py @@ -505,8 +505,7 @@ def set_tag_range(self, request: Request) -> JSONResponse: interface.set_tag_ranges(ranges, tag_type) self.handle_on_interface_tags(interface) except KytosTagError as err: - detail = f"Error when setting tag ranges: {err}" - raise HTTPException(400, detail=detail) + raise HTTPException(400, detail=str(err)) return JSONResponse("Operation Successful", status_code=200) @rest('v3/interfaces/{interface_id}/tag_ranges', methods=['DELETE']) @@ -523,8 +522,7 @@ def delete_tag_range(self, request: Request) -> JSONResponse: interface.remove_tag_ranges(tag_type) self.handle_on_interface_tags(interface) except KytosTagError as err: - detail = f"Error with tag_type. {err}" - raise HTTPException(400, detail=detail) + raise HTTPException(400, detail=str(err)) return JSONResponse("Operation Successful", status_code=200) @rest('v3/interfaces/tag_ranges', methods=['GET'])