Skip to content
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

[Feature]: improve missing ID handling ("undefined response type") #783

Open
displague opened this issue Sep 24, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@displague
Copy link
Member

displague commented Sep 24, 2024

Description

when a value like project_id is set empty (""), through misconfiguration, the URLs constructed in API requests may look like "POST /metal/v1/projects//devices".

This results in API/HTTP errors like:

HTTP/1.1 403 Forbidden
Connection: close
Content-Length: 404
Content-Type: text/html
Date: Tue, 24 Sep 2024 20:35:47 GMT
Expires: Tue, 24 Sep 2024 20:35:47 GMT
Mime-Version: 1.0
Server: AkamaiGHost

<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>

You don't have permission to access "http&#58;&#47;&#47;api&#46;equinix&#46;com&#47;metal&#47;v1&#47;projects&#47;devices" on this server.<P>
Reference&#32;&#35;18&#46;c9542117&#46;1727210147&#46;5658ac3
<P>https&#58;&#47;&#47;errors&#46;edgesuite&#46;net&#47;18&#46;c9542117&#46;1727210147&#46;5658ac3</P>
</BODY>
</HTML>

and a Terraform error like: error: undefined response type

A better experience would be for Terraform validation to ensure that these required values are not empty strings.
There may be other ways to improve the handling of these 403/HTML errors.

New or Affected Terraform Resources

No response

Potential Terraform Configuration

No response

@displague displague added the enhancement New feature or request label Sep 24, 2024
@displague displague changed the title [Feature]: improve missing ID handling "undefined response type" [Feature]: improve missing ID handling ("undefined response type") Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant