Skip to content

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

@displague

Description

@displague

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions