#470: Added better error messaging for later debugs

This commit is contained in:
frikky
2021-08-13 13:14:51 +02:00
parent 7a4f5d0ae8
commit 56185e53e2
4 changed files with 63 additions and 4 deletions
+2 -2
View File
@@ -1950,8 +1950,8 @@ func handleExecution(id string, workflow shuffle.Workflow, request *http.Request
//Org []Org `json:"org,omitempty" datastore:"org"`
err = shuffle.SetWorkflowExecution(ctx, workflowExecution, true)
if err != nil {
log.Printf("Error saving workflow execution for updates %s: %s", topic, err)
return shuffle.WorkflowExecution{}, "Failed getting workflowexecution", err
log.Printf("[WARNING] Error saving workflow execution for updates %s: %s", topic, err)
return shuffle.WorkflowExecution{}, fmt.Sprintf("Failed setting workflowexecution: %s", err), err
}
// Adds queue for onprem execution
+30
View File
@@ -8138,6 +8138,7 @@ const AngularWorkflow = (props) => {
// //cf80fa70-65cf-4963-b474-b459a6dead81
//}
console.log(selectedResult)
const codePopoutModal = !codeModalOpen ? null :
<Draggable
onDrag={(e) => {
@@ -8295,6 +8296,35 @@ const AngularWorkflow = (props) => {
}}>{selectedResult.result}</span>
</div>
}
<div>
{selectedResult.action.parameters !== null && selectedResult.action.parameters !== undefined ?
<div>
<Divider style={{backgroundColor: theme.palette.surfaceColor, marginTop: 15, marginBottom: 15, }}/>
<Typography variant="h6" style={{marginBottom: 0, marginTop: 0}}>
Variables
</Typography>
{selectedResult.action.parameters.map((data, index) => {
if (data.value.length === 0) {
return null
}
if (data.example !== undefined && data.example !== null && data.example.includes("***")) {
return null
}
return (
<div key={index} style={{}}>
<Typography variant="body1" style={{marginBottom: 0, marginTop: 5}}>
<b>{data.name}</b>: {data.value}
</Typography>
</div>
)
})}
</div>
:
null
}
</div>
</div>
</Dialog>
</Draggable>
+29
View File
@@ -1097,9 +1097,16 @@ const AppCreator = (props) => {
}
if (item.queries.length > 0) {
var skipped = false
for (var querykey in item.queries) {
const queryitem = item.queries[querykey]
if (queryitem.name.toLowerCase() == "url") {
console.log(item.name+" uses a bad query: url")
skipped = true
break
}
var newitem = {
"in": "query",
"name": queryitem.name,
@@ -1117,12 +1124,27 @@ const AppCreator = (props) => {
data.paths[item.url][item.method.toLowerCase()].parameters.push(newitem)
//console.log(queryitem)
}
// Bad code as it doesn't allow for "anything".
if (skipped) {
alert.info("Bad configuration of "+item.name+". Skipping because queries are invalid.")
continue
}
}
//data.paths[item.url][item.method.toLowerCase()].parameters.push(newitem)
if (item.paths.length > 0) {
for (querykey in item.paths) {
const queryitem = item.paths[querykey]
if (queryitem.toLowerCase() == "url") {
queryitem = "action_url"
}
if (queryitem.toLowerCase() == "apikey") {
queryitem = "action_apikey"
}
newitem = {
"in": "path",
"name": queryitem,
@@ -1315,6 +1337,13 @@ const AppCreator = (props) => {
if (setExtraAuth.length > 0) {
for (var key in extraAuth) {
const curauth = extraAuth[key]
if (curauth.name.toLowerCase() == "url") {
alert.error("Can't add extra auth with Name URL")
setAppBuilding(false)
return
}
data.components.securitySchemes[curauth.name] = {
"type": "apiKey",
"in": curauth.type,
+2 -2
View File
@@ -234,7 +234,7 @@ const Docs = (props) => {
// );
//}
const postDataBrowser =
const postDataBrowser = list === undefined || list === null ? null :
<div style={Body}>
<div style={SideBar}>
<Paper style={SidebarPaperStyle}>
@@ -278,7 +278,7 @@ const Docs = (props) => {
flexDirection: "column",
}
const postDataMobile =
const postDataMobile = list === undefined || list === null ? null :
<div style={mobileStyle}>
<div>
<Button fullWidth aria-controls="simple-menu" aria-haspopup="true" variant="outlined" color="primary" onClick={handleClick}>