Strapi: error when trying to update an entry 'entry.notFound' - strapi

I am trying to update some data for an entry in strapi. Everything was going fine and I was doing it correctly but suddenly I got this error.
{
"event": "didNotEditEntry",
"properties": {
"error": {
"response": {
"payload": {
"statusCode": 400,
"error": "Bad Request",
"message": [
{
"messages": [
{
"id": "entry.notFound",
"message": "entry.notFound"
}
]
}
],
"data": [
{
"messages": [
{
"id": "entry.notFound",
"message": "entry.notFound"
}
]
}
]
}
}
},
"status": "draft",
"projectType": "Community"
},
"uuid": "xxxxxxxx"
}
Does anyone know why I can't update the strapi console? I'm just updating one text for another.

Related

Google GA4 batchRunReports when API doesn't have records throw 500 (Internal Server Error)

https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/TopLevel/batchRunReports
Request :
{
"entity": {
"propertyId": "XXXXXXXX"
},
"requests": [
{
"entity": {
"propertyId": "XXXXXXXX"
},
"dimensions": [
{
"name": "date"
},
{
"name": "dateHour"
},
{
"name": "firstUserCampaignName"
}
],
"metrics": [
{
"name": "sessions"
}
],
"dateRanges": [
{
"startDate": "2021-04-06",
"endDate": "2021-04-07"
}
],
"metricAggregations": [
"TOTAL"
],
"dimensionFilter": {
"andGroup": {
"expressions": [
{
"filter": {
"fieldName": "medium",
"stringFilter": {
"matchType": "EXACT",
"value": "Test"
}
}
}
]
}
},
"orderBys": [
{
"desc": true,
"metric": {
"metricName": "sessions"
}
},
{
"desc": false,
"dimension": {
"dimensionName": "dateHour"
}
}
],
"keepEmptyRows": true
}
]
}
Response:
{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}
But if remove following property from request:
"metricAggregations": [
"TOTAL"
],
I am able to see following response where there is not rows :
{
"reports": [
{
"metricHeaders": [
{
"name": "sessions",
"type": "TYPE_INTEGER"
}
],
"metadata": {},
"dimensionHeaders": [
{
"name": "date"
},
{
"name": "dateHour"
},
{
"name": "firstUserCampaignName"
}
],
"kind": "analyticsData#runReport"
}
],
"kind": "analyticsData#batchRunReports"
}
Any idea how to prevent 500 internal server error in this case ?
This error block google API call for an hour.
Furqan, there seems to be an issue with the Data API where a call using metricAggregations is failing in case the generated report is empty. In the meantime, to workaround this error, you can modify a query so that the resulting report contains more than 0 rows.

ARM Template unable to set $connections

I have created an ARM template in Visual Studio project with connection to slack. When I connect to slack in Azure portal - everything is fine. My slack API connection is authorized and works. My problem is with deployment and setting $connections.
Here is my template
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
<template-params>
},
"variables": {
"slack": "[concat(parameters('appPrefix'), '-slack-', parameters('environment'))]"
},
"resources": [
{
"type": "Microsoft.Web/connections",
"apiVersion": "2016-06-01",
"location": "[resourceGroup().location]",
"name": "[variables('slack')]",
"properties": {
"api": {
"id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/slack')]"
},
"displayName": "Slack",
"parameterValues": {}
}
},
{
"name": "[parameters('logicAppName')]",
"type": "Microsoft.Logic/workflows",
"location": "[parameters('logicAppLocation')]",
"tags": {
"displayName": "LogicApp"
},
"apiVersion": "2016-06-01",
"properties": {
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Collecting_went_wrong": {
"inputs": {
"host": {
"connection": {
"name": "#parameters('$connections')['slack']['connectionId']"
}
},
"method": "post",
"path": "/chat.postMessage",
"queries": {
"channel": "<channel>",
"text": "<message>",
"username": "<user>"
}
},
"runAfter": {},
"type": "ApiConnection"
}
},
"parameters": {
"$connections": {
"type": "object",
"defaultValue": {
}
}
},
"triggers": {
<trigger>
}
},
"parameters": {
"$connections": {
"value": {
"slack": {
"id": "[resourceId('Microsoft.Web/connections', variables('slack'))]",
"connectionId": "[resourceId('Microsoft.Web/connections', variables('slack'))]",
"connectionName": "slack"
}
}
}
}
},
"dependsOn": [
"[resourceId('Microsoft.Web/connections', variables('slack'))]"
]
}
],
"outputs": {}
}
The 'fun' part is validation of template during the deployment:
New-AzureRmResourceGroupDeployment : 17:08:51 - Resource Microsoft.Logic/workflows 'reporting-reminder-logic-app-dev'
failed with message '{
"error": {
"code": "ConnectionsParameterInvalid",
"message": "The provided API connection parameter 'slack' is missing the required property 'id'."
}
}'
I'm really confused here.
What I tried to deploy it as connection and added $connection parameter definition as well, deployment went through. Nevertheless, when I changed connection to $connections in template parameters, Azure portal throw at me the same validation error.
Any idea what am I doing wrong here?
Thanks
The issue was about different ID in resources -> Microsoft/Web.connections -> properties -> id and slack -> connection. Once this connection ids were the same, the validation passed.
So it's only confusing validation message.

Autodesk Forge Model Derivative API: TranslationWorker-InternalFailure

I am attempting to translate an .rvt file to svf using the following call using the model derivative forge api. I am uploading a single rvt file and the file is not corrupt
POST /modelderivative/v2/designdata/job HTTP/1.1
Host: developer.api.autodesk.com
Authorization: Bearer
Content-Type: application/json; charset=utf-8
x-ads-force: true
Cache-Control: no-cache
Postman-Token: a05c2308-6b4f-7a3f-57b0-2916f25d0157
{
"input": {
"urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Zm9yZ2V0ZXN0c3AvV0lMRC5ydnQ=",
"compressedUrn": true,
"rootFilename": "WILD.rvt"
},
"output": {
"destination": {
"region": "us"
},
"formats": [
{
"type": "svf",
"views": ["2d"]
}]
}
}
Here is the response I get. Not sure what is wrong. Please help
{
"type": "manifest",
"hasThumbnail": "false",
"status": "failed",
"progress": "complete",
"region": "US",
"urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Zm9yZ2V0ZXN0c3AvV0lMRC5ydnQ",
"version": "1.0",
"derivatives": [
{
"name": "LMV Bubble",
"hasThumbnail": "false",
"status": "failed",
"progress": "complete",
"messages": [
{
"type": "error",
"message": "Tr worker fail to download.",
"code": "TranslationWorker-InternalFailure"
}
],
"outputType": "svf"
}
]
}
Since you translating a RVT and not an archive (ZIP) so remove the "compressedUrn": true, "rootFilename": "WILD.rvt" (which is for archives and their root files) bit from your job request payload:
{
"input": {
"urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Zm9yZ2V0ZXN0c3AvV0lMRC5ydnQ="
},
"output": {
"destination": {
"region": "us"
},
"formats": [
{
"type": "svf",
"views": ["2d"]
}]
}
}

Error trying to simulate a pipeline

I'm trying to create a gsub pipeline, but before I do I'm trying to simulate it by following the many examples on the internet. Here's my code:
PUT _ingest/pipeline/removescript/_simulate
{
"pipeline" :{
"description": "remove script",
"processors": [
{ "gsub" :{
"field": "content",
"pattern": "(?:..)[^<%]+[^%>](?:..)",
"replacement": ""
}
}]
},
"docs": [
{
"_id": "tt",
"_source": {
"content": "leave <% remove me %> Me"
}
}]
}
However when I run it I receive the following error:
No handler found for uri [/_ingest/pipeline/removescript/_simulate] and method [PUT]
If I change the PUT line to be:
PUT _ingest/pipeline/_simulate or PUT _ingest/pipeline/removescript
then I receive the following error:
{
"error": {
"root_cause": [
{
"type": "parse_exception",
"reason": "[processors] required property is missing",
"header": {
"property_name": "processors"
}
}
],
"type": "parse_exception",
"reason": "[processors] required property is missing",
"header": {
"property_name": "processors"
}
},
"status": 400
}
The _simulate endpoint works only with POST and not PUT:
POST _ingest/pipeline/removescript/_simulate
{
...
}

ElasticSearch Troubleshooting Watcher : illegal_argument_exception

Watcher was working and succesfully alerting the Slack channel but now I'm having a trouble.
The only change that I've made was to update its refresh interval. When I run the following GET, it returns watcher actions's state as "awaits_successful_execution".
GET _watcher/watch/my_watcher
{
"found": true,
"_id": "etl_incr_morp_to_hermes",
"_status": {
"version": 432497,
"state": {
"active": true,
"timestamp": "2017-03-24T07:14:41.301Z"
},
"actions": {
"notify-slack": {
"ack": {
"timestamp": "2017-03-24T07:14:41.301Z",
"state": "awaits_successful_execution"
}
}
}
}
...
I've checked Elastic's documentation. When I try to get more info about watcher by calling the following API, I get this result:
GET _watcher
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "No endpoint or operation is available at [_watcher]"
}
],
"type": "illegal_argument_exception",
"reason": "No endpoint or operation is available at [_watcher]"
},
"status": 400
}
How can I troubleshot watcher? Is there any logs that I can check?
I found the answer!
The following request returns specified watcher's execution history.
GET .watcher-history*/_search
{
"query": {
"query_string": {
"query": "watch_id: my_watcher"
}
},
"size": 1,
"sort": [
{
"result.execution_time": { "order": "desc"}
}
]
}

Resources