plesk / plesk/api-php-lib

Multiple Site Alias request returns insufficient error content

Open
#73 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
157
Forks
79
PR merge metrics
No merged PRs in 30d

Description

In setting up some tools to 'bulk-manage' site aliases, it appears that when I make a request to get Info for multiple Site Aliases and one of them doesn't exist, I get a generic, singular, and somewhat malformed result. Examples below:

There were four aliased subdomains on qa.domain.com. The last two aliases have been removed prior to this test.

REQUEST

<packet>
    <site-alias>
        <get>
            <filter>
                <name>alias-02.qa.domain.com</name>
                <name>alias-03.qa.domain.com</name>
                <name>alias-04.qa.domain.com</name>
                <name>alias-05.qa.domain.com</name>
            </filter>
        </get>
    </site-alias>
</packet>

RESPONSE (in JSON for readability)

{
    "success": false,
    "domain": "..domain.com",
    "message": "Domain alias does not exist"
}

The domain element is malformed, and it neither gives me the info that it can get on the existing aliases, nor does it tell me which aliases, if any, do not exist.

I can work around this by making discrete calls to see which fail, but cringe at the wasted overhead and time to set this up.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the multi-name site-alias get request and its malformed response example, then trace how the library handles missing aliases and successful results. Done means the response identifies missing aliases and returns information for aliases that exist, without the malformed domain value.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.