Microsoft Graph Beta Channel API giving 500 Error while creating private channels - postman

Till yesterday I was able to create private channels through Beta Channel API. Suddenly today its giving 500 Error(Internal server Error). I am passing token in headers and Json also correctly.
Does anyone also facing the same issue.
API which I am executing in Postman
https://graph.microsoft.com/beta/teams/{teamid}/channels
{
"#odata.type": "#Microsoft.Teams.Core.channel",
"membershipType": "private",
"displayName": "My First Private Channel",
"description": "This is my first private channels",
"members":
[
{
"#odata.type":"#microsoft.graph.aadUserConversationMember",
"user#odata.bind":"https://graph.microsoft.com/beta/users('92fb4ef2-3ad8-4316-a6f2-2925afcb7d75')",
"roles":["owner"]
}
]
}

Related

Agora cloud recording with Google cloud storage

I want to record my voice call with agora cloud recording. I'm using a Postman collection provided by Agora, and I don't change anything except StorageConfig. I'm successful in getting resourceID and sid, but when I stop recording, I receive the error "Failed to find worker." Based on an agora document, they said for Google Clound the region parameter has no effect, whether it is set or not, so I'm setting it to 0. There's a list of solutions I've tried but have had no success with:
Change region
Both users have different UIDs, and the recording UID is different from them.
Access key and secret key is correct
I don't know what I did wrong. Please help me. Thanks all.
{
"resourceId": "nUwUbQf9Zg6tsgtLslGnDg0lk8RYaUE09pqOuSIgwfwi6-n9kITolzw3vvIFHMfm2VZsOrLd9fk9kMzos8Y_D-2Z2fFtUu_1BD2_pKJEZ-jTgXPe--K6Ua7TpSNY0pLd4zzyZV6iXCndqZvHmfsZloox0y-UZgs-r2_zBR2Gor05YCP0HuusWF8Kv1StAYabr1HJykw7RorDYnUIzzry6p6LRfvlq2zJVyVxvzVRVmoeMPYX-cVKyhNDuI2ct9a9aPdi8jCwDUzRbYimVVAnJBRYppTH012Xt6DnnMBkskJsbK0-CK3IaipQA9Gu2RmIJxSowuZbHspwA2lpwpzre-aNG6NlXk95hZgthOfNUVE",
"sid": "edd35b65ec496e43aa502cad99bbdb27",
"code": 404,
"serverResponse": {
"command": "StopCloudRecorder",
"payload": {
"message": "Failed to find worker."
},
"subscribeModeBitmask": 1,
"vid": "1020399"
}
}

GCP Snapshot create API failing through C++ code, but not through postman

I've been trying to make API calls to create snapshot of GCP disk through my code but it keeps giving me this error:
Failed to check snapshot status before creating GCPDisk swift-snapshot-gkeos-dkdwl-dynamic-pvc-1b13097f-7-1630579922. HTTP Error: GET request to the remote host failed [HTTP-Code: 404]: {
"error": {
"code": 404,
"message": "The resource 'projects/rw-migration-dev/global/snapshots/swift-snapshot-gkeos-dkdwl-dynamic-pvc-1b13097f-7-1630579922' was not found",
"errors": [
{
"message": "The resource 'projects/rw-migration-dev/global/snapshots/swift-snapshot-gkeos-dkdwl-dynamic-pvc-1b13097f-7-1630579922' was not found",
"domain": "global",
"reason": "notFound"
}
]
}
}
My program worked fine for a considerable amount of time, but now sometimes it gives errors.
I tried passing the same query through postman and it works fine. Some times it works fine through .
The main problem is with the snapshot creating API,
https://compute.googleapis.com/compute/v1/projects/{projectName}/zones/{diskLocation}/disks/{diskName}/createSnapshot
This URL works fine on postman, after creation you can see the snapshot when you list them, but through code once this API is called it returns an OK 200, but no snapshot is created
Can someone tell me why this is happening?
I think you are trying to use this operation:
https://cloud.google.com/compute/docs/reference/rest/v1/disks/createSnapshot
Which is a long running operation, a 200 response indicates that the snapshot operation started, but it does not indicate that it has finished.
The documentation points to:
https://cloud.google.com/compute/docs/api/how-tos/api-requests-responses#handling_api_responses
You may need to poll the operation until it completes before trying to use the snapshot.

Google Vision not always including pagesWithMatchingImages in web detection responses

I'm sending web detection requests like this to the Google Vision API.
{
"requests": [
{
"image": {
"content": "<base 64 encoded image>"
},
"features": [
{
"maxResults": 50,
"type": "WEB_DETECTION"
}
]
}
]
}
The requests are being sent to https://vision.googleapis.com/v1/images:annotate?key=<my key>.
The part of the response I need is pagesWithMatchingImages, so I can see which pages have the given image. This works for most of the images I've tried, but not for images that contain text. If the image is a common logo that includes text, for example, then the API doesn't include pagesWithMatchingImages in the response.
How can I get a list of pages with matching images for images that include text?
Here's are some samples of images that are used on a lot of web pages, but don't have pagesWithMatchingImages in the API response:
The issue you are facing with the Google Vision API WEB_DETECTION feature seems to be an issue detected by the Google Vision API team, they seem to be investigating more about it and they will post the updates within the Public Issue Tracker post.
One of the reasons the WEB_DETECTION feature does not responds with the pagesWithMatchingImages seems to be related to the transparency in PNG images, adding a white background might help the WEB_DETECTION feature according to the post, but does not warranty the accuracy in the response
The Public Issue Tracker is used for reporting bugs and feature requests of the Google Cloud products, by indicating that you are affected by the same issue it can help to bring more visibility on it and expedite the resolution.
You can try to add the LOGO_DETECTION type under features.
{
"requests": [
{
"image": {
"content": "<base 64 encoded image>"
},
"features": [
{
"maxResults": 50,
"type": "WEB_DETECTION"
}
{
"type": "LOGO_DETECTION"
}
]
}
]
}

Using the REST-API with the getting started guide returns 500 error

Following the instructions at https://fabric-composer.github.io/start/getting-started-rest-api.html, testing the generated api with
curl -X GET --header "Accept: application/json" "http://0.0.0.0:3000/api/net.biz.digitalPropertyNetwork.LandTitle"
generates the following error
{
"error": {
"statusCode": 500,
"name": "Error",
"message": "No registered namespace for type net_biz_digitalPropertyNetwork_LandTitle",
"stack": "Error: No registered namespace for type net_biz_digitalPropertyNetwork_LandTitle\n at ModelManager.getType (/Users/matt/Documents/workspaces/blockchain/src/github.com/fabric-composer/sample-applications/node_modules/composer-common/lib/modelmanager.js:265:23)\n at ensureConnected.then (/Users/matt/Documents/workspaces/blockchain/src/github.com/fabric-composer/sample-applications/node_modules/composer-loopback-connector/lib/businessnetworkconnector.js:198:53)\n at process._tickDomainCallback (internal/process/next_tick.js:129:7)"
}
}
I see that the boot script swaps dots for underscores, is this needed somewhere else too, perhaps?
// this is required because LoopBack doesn't like dots in model schema names
modelSchema.name = modelSchema.plural.replace(/\./g, '_');
For reference, here are the node dependencies of my loopback package
"dependencies": {
"composer-loopback-connector": "^0.4.0",
"compression": "^1.0.3",
"cors": "^2.5.2",
"helmet": "^1.3.0",
"loopback": "^2.22.0",
"loopback-boot": "^2.6.5",
"loopback-component-explorer": "^2.4.0",
"loopback-connector-composer": "^0.4.1",
"loopback-datasource-juggler": "^2.39.0",
"serve-favicon": "^2.0.1",
"strong-error-handler": "^1.0.1"
}
Yes, you're right about the boot script swapping the dots for underscores. This is due to loopback not accepting dots in model names so the boot script swaps them out and the connector takes account of that when it gets called by the loopback app.
This was a problem with the original connector which is in npm as composer-connector-loopback. That version hasn't been removed yet but should be soon.
It has since been renamed to bring it in line with other loopback connectors and is also in npm as loopback-connector-composer.
I'll raise an issue to get the getting-started guide that you mentioned updated and if you can switch over to using the other connector then that should solve the problem. HTH.

AWS API Gateway : Execution failed due to configuration error: No match for output mapping and no default output mapping configured

In AWS API Gateway, I have a GET method that invokes a lambda function.
When I test the method in the API Gateway dashboard, the lambda function executes successfully but API Gateway is not mapping the context.success() call to a 200 result despite having default mapping set to yes.
Instead I get this error:
Execution failed due to configuration error: No match for output mapping and no default output mapping configured
This is my Integration Response setup:
And this is my method response setup:
Basically I would expect the API Gateway to recognize the successful lambda execution and then map it by default to a 200 response but
that doesn't happen.
Does anyone know why this isn't working?
I have same issue while uploading api using serverless framework. You can simply follow bellow steps which resolve my issue.
1- Navigate to aws api gateway
2- find your api and click on method(Post, Get, Any, etc)
3- click on method response
4- Add method with 200 response.
5- Save it & test
I had the similar issue, got it resolved by adding the method response 200
This is a 'check-the-basics' type of answer. In my scenario, CORS and the bug mentioned above were not at issue. However, the error message given in the title is exactly what I saw and what led me to this thread.
Instead, (an an API Gateway newb) I had failed to redeploy the deployment. Once I did that, everything worked.
As a bonus, for Terraform 0.12 users, the magic you need and should use is a triggers parameter for your aws_api_gateway_deployment resource. This will automatically redeploy for you when other related APIGW resources change. See the TF documentation for details.
There was an issue when saving the default integration response mapping which has been resolved. The bug caused requests to API methods that were saved incorrectly to return a 500 error, the CloudWatch logs should contain:
Execution failed due to configuration error:
No match for output mapping and no default output mapping configured.
Since the 'ENABLE CORS' saves the default integration response, this issue also appeared in your scenario.
For more information, please refer to the AWS forums entry: https://forums.aws.amazon.com/thread.jspa?threadID=221197&tstart=0
Best,
Jurgen
What worked for me:
1. In Api Gateway Console created OPTIONS method manually
2. In the Method Response section under created OPTIONS method added 200 OK
3. Selected Option method and enabled CORS from menu
I found the problem:
Amazon had added a new button in the API-Gateway resource configuration
titled 'Enable CORS'. I had earlier clicked this however once enabled
there doesn't seem to be a way to disable it
Enabling CORS using this button (Instead of doing it manually which is what I ended up doing) seems to cause an internal server error even on a
successful lambda execution.
SOLUTION: I deleted the resource and created it again without clicking
on 'Enable CORS' this time and everything worked fine.
This seems to be a BUG with that feature but perhaps I just don't
understand it well enough. Comment if you have any further information.
Thanks.
Check the box which says "Use Lambda Proxy integration".
This works fine for me. For reference, my lambda function looks like this...
def lambda_handler(event, context:
# Get params
param1 = event['queryStringParameters']['param1']
param2 = event['queryStringParameters']['param2']
# Do some stuff with params to get body
body = some_fn(param1, param2)
# Return response object
response_object = {}
response_object['statusCode'] = 200
response_object['headers'] = {}
response_object['headers']['Content-Type']='application/json'
response_object['body'] = json.dumps(body)
return response_object
I just drop this here because I faced the same issue today and in my case was that we are appending at the end of the endpoint a /. So for example, if this is the definition:
{
"openapi": "3.0.1",
"info": {
"title": "some api",
"version": "2021-04-23T23:59:37Z"
},
"servers": [
{
"url": "https://api-gw.domain.com"
}
],
"paths": {
"/api/{version}/intelligence/topic": {
"get": {
"parameters": [
{
"name": "username",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "version",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "x-api-key",
"in": "header",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-AWS-Cognito-Group-ID",
"in": "header",
"schema": {
"type": "string"
}
}
],
...
Remove any / at the end of the endpoint: /api/{version}/intelligence/topic. Also do the same in uri on apigateway-integration section of the swagger + api gw extensions json.
Make sure your ARN for the role is indeed a role (and not, e.g., the policy).