-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid requestUri on GeoPlacesClient > getPlace #3030
Comments
Hey @SiMoSiMo2, sorry to hear about your issues. We are currently working on a fix for this. In the meantime, would you please use the following workaround: $client = new GeoPlacesClient([
'region' => 'us-east-2',
]);
$client->getHandlerList()->appendBuild(
\Aws\Middleware::mapRequest(function (RequestInterface $request) {
$uri = $request->getUri();
$uri = $uri->withPath(
'/v2' . $uri->getPath()
);
return $request->withUri($uri);
})
);
... ANY REQUEST with the client created previously I know you mentioned you were able to get it working by editing the model file Please let me know if that helps! Thanks! |
Hi @yenfryherrerafeliz thanks for your workaround. It works! |
Hi @SiMoSiMo2, Thanks for your patience. This should be fixed as of today's release. Could you let us know if this is resolved after upgrading? Thanks! |
Hi @stobrien89 it seems that everything works fine. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
I am trying to use
Amazon Location Service Places V2
but following the documentation (https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-geo-places-2020-11-19.html) I cannot get theGetPlace
call to work.I successfully instantiate the
GeoPlacesClient
client and then callGetPlace
passingLanguage
andPlaceId
parameters (I also tried adding theKey
parameter).However, the call throws an
GeoPlacesException
exception:Parsing the requested URL it seems that
v2
is missing from the URIclient request:
https://places.geo.eu-central-1.amazonaws.com/place/AQAAADg...
working request:
https://places.geo.eu-central-1.amazonaws.com/v2/place/AQAAADg...
Regression Issue
Expected Behavior
I expect to get
Result
object.Current Behavior
I have this exception:
AccessDeniedException (client): Unable to determine service/operation name to be authorized - {"Message":"Unable to determine service/operation name to be authorized"}
Reproduction Steps
Instantiate the client (https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.GeoPlaces.GeoPlacesClient.html):
call the method (https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-geo-places-2020-11-19.html#getplace):
Possible Solution
No response
Additional Information/Context
I've tried to add
v2
to therequestUri
insidevendor/aws/aws-sdk-php/src/data/geo-places/2020-11-19/api-2.json.php
and I've got the expected responseSDK version used
3.328.0
Environment details (Version of PHP (
php -v
)? OS name and version, etc.)PHP 8.3.6
The text was updated successfully, but these errors were encountered: