vorteil/direktiv

View on GitHub
pkg/api/errors.go

Summary

Maintainability
A
1 hr
Test Coverage

Function writeDataStoreError has 6 return statements (exceeds 4 allowed).
Open

func writeDataStoreError(w http.ResponseWriter, err error) {
    if errors.Is(err, datastore.ErrNotFound) {
        writeError(w, &Error{
            Code:    "resource_not_found",
            Message: "requested resource is not found",
Severity: Major
Found in pkg/api/errors.go - About 40 mins to fix

    Function writeFileStoreError has 5 return statements (exceeds 4 allowed).
    Open

    func writeFileStoreError(w http.ResponseWriter, err error) {
        if errors.Is(err, filestore.ErrNotFound) {
            writeError(w, &Error{
                Code:    "resource_not_found",
                Message: "filesystem path is not found",
    Severity: Major
    Found in pkg/api/errors.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status