Skip to content

generate bug #1757

Open
Open
@yanxianz

Description

@yanxianz

this is my code(tsoa version is 6.4.0)

@Example(campaignExample)
  @Get('/detail')
  public async getCampaignDetail(
    @Request() request: CustomRequest,
    @Queries() params: BaseParams,
  ) {
    if (!request.shopId || !request.customerId) {
      throw new NotFoundData(SHOP_OR_CUSTOMER_NOT_FOUND.toString());
      // return responseFactory(null, SHOP_OR_CUSTOMER_NOT_FOUND.toString(), 400);
    }

    return responseFactory(
      await this.campaignService.getOngoingCampaignDetail(
        request.shopId,
        request.customerId,
      ),
    );
  }

and I get this error message

Generate routes error.
[0]  TypeError: Cannot read properties of undefined (reading 'kind')

If I remove the comment in the line below, my program will run

return responseFactory(null, SHOP_OR_CUSTOMER_NOT_FOUND.toString(), 400);

and if my data have Date type have this bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions