+
Skip to content

Releases: encoredev/encore

v1.50.6 — Minor fix

15 Oct 13:27
28373a2

Choose a tag to compare

What's Changed

  • runtimes/core: write log rows extra_fields to traces by @fredr in #2114

Full Changelog: v1.50.5...v1.50.6

Minor fix

14 Oct 13:22
28e68ff

Choose a tag to compare

What's Changed

Full Changelog: v1.50.2...v1.50.5

v1.50.4 — Minor improvements and bugfixes

10 Oct 15:49
38fe23b

Choose a tag to compare

What's Changed

Full Changelog: v1.50.1...v1.50.4

v1.50.2 — Improvements & bugfixes

06 Oct 09:49
38fe23b

Choose a tag to compare

What's Changed

Full Changelog: v1.50.1...v1.50.2

v1.50.1 — Improvements & fixes

02 Oct 07:57
d456807

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.50.0...v1.50.1

v1.50.0 — Redact sensitive data & other improvements

10 Sep 13:25
2f3577c

Choose a tag to compare

Redacting sensitive data in Encore.ts

When handling sensitive information like API keys, passwords, or personally identifiable information (PII), you may want to prevent these details from appearing in traces.

Encore.ts now allows you to mark an endpoint as sensitive to redact payloads and headers from traces for that endpoint.
Read more in the docs

What's Changed

  • runtimes/core: add support for pgvector type by @fredr in #2055
  • runtimes/js: add tags to stream endpoints options by @fredr in #2056
  • runtimes/core+js: add option to redact tracing details for endpoint by @fredr in #2057
  • runtimes/go: fix custom http status on external service to service calls by @fredr in #2058
  • docs/ts: sensitive api option by @fredr in #2059

Full Changelog: v1.49.3...v1.50.0

v1.49.3 — Minor improvements & Go 1.25.0 support

03 Sep 15:34
08c8c59

Choose a tag to compare

v1.49.3 is here and Encore is now bundled with Go 1.25.0 for encore.go ❤️

What's Changed

New Contributors

Full Changelog: v1.49.1...v1.49.3

v1.49.1 — Minor fix

22 Aug 14:51
1bdb993

Choose a tag to compare

What's Changed

Full Changelog: v1.49.0...v1.49.1

v1.49.0 — Custom HTTP Status Codes

21 Aug 08:20
a62ac83

Choose a tag to compare

Custom HTTP Status Codes

Encore now supports setting custom HTTP status codes in your API responses for both Encore.ts and Encore.go applications.

By default, Encore automatically sets appropriate HTTP status codes for your API responses. We recommend using these default status codes, but there are situations where you might need to set a custom HTTP status code, such as when porting an existing API that clients depend on for specific status codes.

Encore.ts

To set a custom HTTP status code, include an HttpStatus field in your response interface:

import { api, HttpStatus } from "encore.dev/api";

interface Response {
  message: string;
  status: HttpStatus;
}

export const createUser = api(
  { expose: true, method: "POST", path: "/users" },
  async (): Promise<Response> => {
    return { 
      message: "User created successfully", 
      status: HttpStatus.Created 
    };
  }
);

The HttpStatus enum includes all standard HTTP status codes like HttpStatus.OK, HttpStatus.Created, HttpStatus.BadRequest, etc.

Learn more: Defining APIs with Encore.ts

Encore.go

To set a custom HTTP status code, use the encore:"httpstatus" struct tag on a field in your response type:

type Response struct {
    Message string `json:"message"`
    Status  int    `encore:"httpstatus"`
}

//encore:api public method=POST path=/users
func CreateUser(ctx context.Context) (*Response, error) {
    return &Response{
        Message: "User created successfully",
        Status:  201, // HTTP 201 Created
    }, nil
}

The field with the encore:"httpstatus" tag can be an integer type and should contain a valid HTTP status code value.

Learn more: Defining APIs with Encore.go

Don't forget to update: encore version update

What's Changed

  • hide internal method in middleware docs by @fredr in #2044
  • runtimes/go: add support for setting custom http status codes by @fredr in #2042
  • runtimes/core+js: add support for setting custom http status codes by @fredr in #2045
  • docs: add docs for custom http statuses by @fredr in #2048

Full Changelog: v1.48.13...v1.49.0

v1.48.13 — Improvements

18 Aug 15:19
4f22eae

Choose a tag to compare

What's Changed

Thanks to our first time contributor ❤️

Full Changelog: v1.48.12...v1.48.13

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载