Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 51 - 60 of 2,845 for error (0.02 seconds)

  1. docs/en/docs/tutorial/handling-errors.md

            }
        ]
    }
    ```
    
    you will get a text version, with:
    
    ```
    Validation errors:
    Field: ('path', 'item_id'), Error: Input should be a valid integer, unable to parse string as an integer
    ```
    
    ### Override the `HTTPException` error handler { #override-the-httpexception-error-handler }
    
    The same way, you can override the `HTTPException` handler.
    
    Created: 2026-04-05 07:19
    - Last Modified: 2026-03-05 18:13
    - 8.9K bytes
    - Click Count (0)
  2. tests/scanner_valuer_test.go

    	if err := DB.Create(&data).Error; err != nil {
    		t.Errorf("Should got no error when creating data, but got %v", err)
    	}
    
    	if err := DB.Model(&data).Update("password", EncryptedData("xnewpass")).Error; err == nil {
    		t.Errorf("Should failed to update data with invalid data")
    	}
    
    	if err := DB.Model(&data).Update("password", EncryptedData("newpass")).Error; err != nil {
    Created: 2026-04-05 09:35
    - Last Modified: 2023-06-07 07:02
    - 10.6K bytes
    - Click Count (0)
  3. cmd/admin-handler-utils.go

    // specific error.
    func toAdminAPIErrCode(ctx context.Context, err error) APIErrorCode {
    	if errors.Is(err, errErasureWriteQuorum) {
    		return ErrAdminConfigNoQuorum
    	}
    	return toAPIErrorCode(ctx, err)
    }
    
    // wraps export error for more context
    func exportError(ctx context.Context, err error, fname, entity string) APIError {
    	if entity == "" {
    Created: 2026-04-05 19:28
    - Last Modified: 2024-07-03 07:17
    - 8.4K bytes
    - Click Count (0)
  4. src/test/java/org/codelibs/fess/suggest/concurrent/DeferredTest.java

            final CountDownLatch latch = new CountDownLatch(3);
    
            deferred.promise().error(error -> {
                callbackCount.incrementAndGet();
                latch.countDown();
            }).error(error -> {
                callbackCount.incrementAndGet();
                latch.countDown();
            }).error(error -> {
                callbackCount.incrementAndGet();
                latch.countDown();
            });
    
    Created: 2026-04-17 09:08
    - Last Modified: 2026-02-01 12:48
    - 21.1K bytes
    - Click Count (0)
  5. tests/create_test.go

    		t.Errorf("no error should happen when auto migrate, but got %v", err)
    	}
    
    	if err := DB.Create(&EmptyStruct{}).Error; err != nil {
    		t.Errorf("No error should happen when creating user, but got %v", err)
    	}
    }
    
    func TestCreateEmptySlice(t *testing.T) {
    	data := []User{}
    	if err := DB.Create(&data).Error; err != gorm.ErrEmptySlice {
    		t.Errorf("no data should be created, got %v", err)
    	}
    Created: 2026-04-05 09:35
    - Last Modified: 2025-07-21 09:55
    - 26.8K bytes
    - Click Count (0)
  6. cmd/storage-rest_test.go

    		t.Fatalf("unexpected error %v", err)
    	}
    
    	if err = storage.MakeVol(t.Context(), "bar"); err != nil {
    		t.Fatalf("unexpected error %v", err)
    	}
    
    	restClient, err := newStorageRESTClient(endpoint, false, tg.Managers[0])
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	for {
    		_, err := restClient.DiskInfo(t.Context(), DiskInfoOptions{})
    		if err == nil || errors.Is(err, errUnformattedDisk) {
    			break
    Created: 2026-04-05 19:28
    - Last Modified: 2025-04-09 14:28
    - 11.4K bytes
    - Click Count (0)
  7. internal/grid/handlers.go

    }
    
    // RemoteErr is a remote error type.
    // Any error seen on a remote will be returned like this.
    type RemoteErr string
    
    // NewRemoteErr creates a new remote error.
    // The error type is not preserved.
    func NewRemoteErr(err error) *RemoteErr {
    	if err == nil {
    		return nil
    	}
    	r := RemoteErr(err.Error())
    	return &r
    }
    
    Created: 2026-04-05 19:28
    - Last Modified: 2025-02-18 16:25
    - 27.7K bytes
    - Click Count (0)
  8. cmd/sftp-server-driver.go

    }
    
    // TransferError will catch network errors during transfer.
    // When TransferError() is called Close() will also
    // be called, so we do not need to Wait() here.
    func (w *writerAt) TransferError(err error) {
    	_ = w.w.CloseWithError(err)
    	_ = w.r.CloseWithError(err)
    	w.err = err
    }
    
    func (w *writerAt) Close() (err error) {
    	switch {
    	case len(w.buffer) > 0:
    Created: 2026-04-05 19:28
    - Last Modified: 2025-02-10 16:35
    - 11.6K bytes
    - Click Count (0)
  9. tests/update_has_many_test.go

    func TestUpdateHasManyAssociations(t *testing.T) {
    	user := *GetUser("update-has-many", Config{})
    
    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	user.Pets = []*Pet{{Name: "pet1"}, {Name: "pet2"}}
    	if err := DB.Save(&user).Error; err != nil {
    		t.Fatalf("errors happened when update: %v", err)
    	}
    
    	var user2 User
    	DB.Preload("Pets").Find(&user2, "id = ?", user.ID)
    Created: 2026-04-05 09:35
    - Last Modified: 2022-01-06 07:02
    - 2K bytes
    - Click Count (0)
  10. src/test/java/jcifs/dcerpc/DcerpcExceptionTest.java

        }
    
        /**
         * Test constructor DcerpcException(int error) with an unknown error code.
         */
        @Test
        void testConstructorWithError_unknownCode() {
            int errorCode = 0x12345678; // An arbitrary unknown error code
            DcerpcException exception = new DcerpcException(errorCode);
    
            assertEquals(errorCode, exception.getErrorCode(), "Error code should match the input.");
    Created: 2026-04-05 00:10
    - Last Modified: 2025-08-14 05:31
    - 5.8K bytes
    - Click Count (0)
Back to Top